Class: Dependencies::Dependency
- Defined in:
- lib/bowline/dependencies/lib/dependencies/dependency.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#options ⇒ Object
Returns the value of attribute options.
-
#versions ⇒ Object
Returns the value of attribute versions.
Instance Method Summary collapse
-
#initialize(name, *options) ⇒ Dependency
constructor
A new instance of Dependency.
Constructor Details
#initialize(name, *options) ⇒ Dependency
Returns a new instance of Dependency.
4 5 6 7 8 9 10 11 |
# File 'lib/bowline/dependencies/lib/dependencies/dependency.rb', line 4 def initialize(name, *) opts = .last.is_a?(Hash) ? .pop : {} vers = @name = name @versions = vers @options = opts end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/bowline/dependencies/lib/dependencies/dependency.rb', line 2 def name @name end |
#options ⇒ Object
Returns the value of attribute options.
2 3 4 |
# File 'lib/bowline/dependencies/lib/dependencies/dependency.rb', line 2 def @options end |
#versions ⇒ Object
Returns the value of attribute versions.
2 3 4 |
# File 'lib/bowline/dependencies/lib/dependencies/dependency.rb', line 2 def versions @versions end |