Class: Love::Gem
- Inherits:
-
Object
- Object
- Love::Gem
- Defined in:
- lib/love/gem.rb
Instance Attribute Summary collapse
-
#authors ⇒ Object
readonly
Returns the value of attribute authors.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#plain_authors ⇒ Object
readonly
Returns the value of attribute plain_authors.
-
#spec ⇒ Object
readonly
Returns the value of attribute spec.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #add_author(author) ⇒ Object
- #fetch_authors ⇒ Object
-
#initialize(spec, fetch = true) ⇒ Gem
constructor
A new instance of Gem.
Constructor Details
#initialize(spec, fetch = true) ⇒ Gem
Returns a new instance of Gem.
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/love/gem.rb', line 6 def initialize(spec, fetch = true) @spec = spec @name = spec.name @plain_authors = spec. if spec.homepage.nil? or spec.homepage.empty? @url = "http://rubygems.org/gems/#{name}" else @url = spec.homepage end @authors = [] if fetch end |
Instance Attribute Details
#authors ⇒ Object (readonly)
Returns the value of attribute authors.
4 5 6 |
# File 'lib/love/gem.rb', line 4 def @authors end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/love/gem.rb', line 4 def name @name end |
#plain_authors ⇒ Object (readonly)
Returns the value of attribute plain_authors.
4 5 6 |
# File 'lib/love/gem.rb', line 4 def @plain_authors end |
#spec ⇒ Object (readonly)
Returns the value of attribute spec.
4 5 6 |
# File 'lib/love/gem.rb', line 4 def spec @spec end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
4 5 6 |
# File 'lib/love/gem.rb', line 4 def url @url end |
Instance Method Details
#add_author(author) ⇒ Object
34 35 36 |
# File 'lib/love/gem.rb', line 34 def () @authors << end |