Class: OffGithub::GemList
- Inherits:
-
Object
- Object
- OffGithub::GemList
- Defined in:
- lib/off_github.rb
Instance Attribute Summary collapse
-
#gems ⇒ Object
readonly
Returns the value of attribute gems.
-
#list ⇒ Object
readonly
Returns the value of attribute list.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
-
#initialize(source = nil) ⇒ GemList
constructor
A new instance of GemList.
- #versions(gem_name) ⇒ Object
Constructor Details
#initialize(source = nil) ⇒ GemList
Returns a new instance of GemList.
40 41 42 43 44 45 46 47 48 |
# File 'lib/off_github.rb', line 40 def initialize(source = nil) if source.class == Array @source = nil @list = source else @source = source fetch_gem_list end end |
Instance Attribute Details
#gems ⇒ Object (readonly)
Returns the value of attribute gems.
38 39 40 |
# File 'lib/off_github.rb', line 38 def gems @gems end |
#list ⇒ Object (readonly)
Returns the value of attribute list.
38 39 40 |
# File 'lib/off_github.rb', line 38 def list @list end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
38 39 40 |
# File 'lib/off_github.rb', line 38 def source @source end |
Instance Method Details
#versions(gem_name) ⇒ Object
50 51 52 |
# File 'lib/off_github.rb', line 50 def versions(gem_name) @gems[gem_name] end |