Class: RemoteGem
Instance Attribute Summary collapse
-
#authors ⇒ Object
Returns the value of attribute authors.
-
#downloads ⇒ Object
Returns the value of attribute downloads.
-
#info ⇒ Object
Returns the value of attribute info.
-
#name ⇒ Object
Returns the value of attribute name.
-
#rubyforge_project ⇒ Object
Returns the value of attribute rubyforge_project.
-
#version ⇒ Object
Returns the value of attribute version.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(hash) ⇒ RemoteGem
constructor
A new instance of RemoteGem.
Constructor Details
#initialize(hash) ⇒ RemoteGem
Returns a new instance of RemoteGem.
13 14 15 16 17 |
# File 'lib/rubygems_plugin.rb', line 13 def initialize(hash) hash.each do |key, value| __send__("#{key}=", value) end end |
Instance Attribute Details
#authors ⇒ Object
Returns the value of attribute authors.
5 6 7 |
# File 'lib/rubygems_plugin.rb', line 5 def @authors end |
#downloads ⇒ Object
Returns the value of attribute downloads.
5 6 7 |
# File 'lib/rubygems_plugin.rb', line 5 def downloads @downloads end |
#info ⇒ Object
Returns the value of attribute info.
5 6 7 |
# File 'lib/rubygems_plugin.rb', line 5 def info @info end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/rubygems_plugin.rb', line 5 def name @name end |
#rubyforge_project ⇒ Object
Returns the value of attribute rubyforge_project.
5 6 7 |
# File 'lib/rubygems_plugin.rb', line 5 def rubyforge_project @rubyforge_project end |
#version ⇒ Object
Returns the value of attribute version.
5 6 7 |
# File 'lib/rubygems_plugin.rb', line 5 def version @version end |
Class Method Details
.info_for(name) ⇒ Object
8 9 10 11 |
# File 'lib/rubygems_plugin.rb', line 8 def self.info_for(name) data = get("http://gemcutter.org/api/v1/gems/#{name}.json") data.code == 404 ? nil : new(data) end |