Class: Asdf::ToolVersion
- Inherits:
-
Object
- Object
- Asdf::ToolVersion
- Defined in:
- lib/asdf/tool_version.rb
Constant Summary collapse
- UninstallFailedError =
Class.new(StandardError)
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(name, version) ⇒ ToolVersion
constructor
A new instance of ToolVersion.
- #uninstall! ⇒ Object
Constructor Details
#initialize(name, version) ⇒ ToolVersion
Returns a new instance of ToolVersion.
11 12 13 14 |
# File 'lib/asdf/tool_version.rb', line 11 def initialize(name, version) @name = name @version = version end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
9 10 11 |
# File 'lib/asdf/tool_version.rb', line 9 def name @name end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
9 10 11 |
# File 'lib/asdf/tool_version.rb', line 9 def version @version end |
Instance Method Details
#uninstall! ⇒ Object
16 17 18 19 20 21 |
# File 'lib/asdf/tool_version.rb', line 16 def uninstall! sh = Shellout.new("asdf uninstall #{name} #{version}").execute raise(UninstallFailedError) unless sh.success? true end |