Class: Freshmeat::Data
- Inherits:
-
Object
- Object
- Freshmeat::Data
- Defined in:
- lib/freshmeat/data.rb
Direct Known Subclasses
Comment, PartialProject, Release, Screenshot, Tag, URL, User
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
-
#fid ⇒ Object
freshmeat object id.
-
#initialize(data) ⇒ Data
constructor
A new instance of Data.
- #method_missing(method) ⇒ Object
Constructor Details
#initialize(data) ⇒ Data
Returns a new instance of Data.
24 25 26 |
# File 'lib/freshmeat/data.rb', line 24 def initialize(data) @data = data end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method) ⇒ Object
28 29 30 |
# File 'lib/freshmeat/data.rb', line 28 def method_missing(method) data[method.to_s] end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
22 23 24 |
# File 'lib/freshmeat/data.rb', line 22 def data @data end |
Instance Method Details
#fid ⇒ Object
freshmeat object id
33 34 35 |
# File 'lib/freshmeat/data.rb', line 33 def fid data["id"] end |