Class: Freshmeat::Data

Inherits:
Object
  • Object
show all
Defined in:
lib/freshmeat/data.rb

Direct Known Subclasses

Comment, PartialProject, Release, Screenshot, Tag, URL, User

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dataObject (readonly)

Returns the value of attribute data.



22
23
24
# File 'lib/freshmeat/data.rb', line 22

def data
  @data
end

Instance Method Details

#fidObject

freshmeat object id



33
34
35
# File 'lib/freshmeat/data.rb', line 33

def fid
  data["id"]
end