Class: GoTransit::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/go_transit/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ Response

Returns a new instance of Response.



7
8
9
10
11
# File 'lib/go_transit/response.rb', line 7

def initialize(payload)
  @metadata = Metadata.new(payload.delete("Metadata"))
  @data = payload_data(payload)
  throw_error
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



3
4
5
# File 'lib/go_transit/response.rb', line 3

def data
  @data
end

#metadataObject (readonly)

Returns the value of attribute metadata.



3
4
5
# File 'lib/go_transit/response.rb', line 3

def 
  @metadata
end