Class: Gemview::Gem::Dependency
- Inherits:
-
Object
- Object
- Gemview::Gem::Dependency
- Defined in:
- lib/gemview/gem.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#requirements ⇒ Object
readonly
Returns the value of attribute requirements.
Instance Method Summary collapse
-
#initialize(options) ⇒ Dependency
constructor
A new instance of Dependency.
- #to_str ⇒ Object
Constructor Details
#initialize(options) ⇒ Dependency
Returns a new instance of Dependency.
54 55 56 57 |
# File 'lib/gemview/gem.rb', line 54 def initialize() @name = .fetch("name") @requirements = .fetch("requirements") end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
51 52 53 |
# File 'lib/gemview/gem.rb', line 51 def name @name end |
#requirements ⇒ Object (readonly)
Returns the value of attribute requirements.
51 52 53 |
# File 'lib/gemview/gem.rb', line 51 def requirements @requirements end |
Instance Method Details
#to_str ⇒ Object
59 60 61 |
# File 'lib/gemview/gem.rb', line 59 def to_str %(gem "#{name}", "#{requirements}") end |