Class: Socrata::Data
Constant Summary
Constants inherited from Socrata
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Attributes inherited from Socrata
Instance Method Summary collapse
- #id ⇒ Object
-
#initialize(data, party) ⇒ Data
constructor
A new instance of Data.
- #method_missing(method) ⇒ Object
Methods inherited from Socrata
Constructor Details
#initialize(data, party) ⇒ Data
Returns a new instance of Data.
19 20 21 22 |
# File 'lib/socrata/data.rb', line 19 def initialize(data, party) @data = data @party = party end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method) ⇒ Object
24 25 26 |
# File 'lib/socrata/data.rb', line 24 def method_missing(method) key = @data[method.to_s] end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
17 18 19 |
# File 'lib/socrata/data.rb', line 17 def data @data end |
Instance Method Details
#id ⇒ Object
28 29 30 |
# File 'lib/socrata/data.rb', line 28 def id @data["id"] end |