Class: SetUpDevelopment::Dependency
- Inherits:
-
Object
- Object
- SetUpDevelopment::Dependency
- Defined in:
- lib/set_up_development/dependency.rb
Instance Attribute Summary collapse
-
#installer ⇒ Object
readonly
Returns the value of attribute installer.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(installer, name) ⇒ Dependency
constructor
A new instance of Dependency.
- #install! ⇒ Object
- #installed? ⇒ Boolean
Constructor Details
#initialize(installer, name) ⇒ Dependency
Returns a new instance of Dependency.
6 7 8 9 |
# File 'lib/set_up_development/dependency.rb', line 6 def initialize(installer, name) @installer = installer @name = name end |
Instance Attribute Details
#installer ⇒ Object (readonly)
Returns the value of attribute installer.
3 4 5 |
# File 'lib/set_up_development/dependency.rb', line 3 def installer @installer end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/set_up_development/dependency.rb', line 3 def name @name end |
Instance Method Details
#install! ⇒ Object
15 16 17 18 19 |
# File 'lib/set_up_development/dependency.rb', line 15 def install! return true if installed? installer.install!(name) true end |
#installed? ⇒ Boolean
11 12 13 |
# File 'lib/set_up_development/dependency.rb', line 11 def installed? installer.installed?(name) end |