Class: Socrata::Data

Inherits:
Socrata show all
Defined in:
lib/socrata/data.rb

Direct Known Subclasses

User, View

Constant Summary

Constants inherited from Socrata

DEFAULT_CONFIG

Instance Attribute Summary collapse

Attributes inherited from Socrata

#batching, #config, #error

Instance Method Summary collapse

Methods inherited from Socrata

#batch_request, #user, #view

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

#dataObject (readonly)

Returns the value of attribute data.



17
18
19
# File 'lib/socrata/data.rb', line 17

def data
  @data
end

Instance Method Details

#idObject



28
29
30
# File 'lib/socrata/data.rb', line 28

def id
  @data["id"]
end