Class: Service::Client::Response

Inherits:
Object
  • Object
show all
Includes:
BaseResponse
Defined in:
lib/service-client/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from BaseResponse

#raw

Constructor Details

#initialize(raw_response) ⇒ Response

Returns a new instance of Response.



8
9
10
11
12
# File 'lib/service-client/response.rb', line 8

def initialize(raw_response)
  super(raw_response)
  body = raw.body.first
  @data = body.empty? ? true : JSON.parse(body)
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



6
7
8
# File 'lib/service-client/response.rb', line 6

def data
  @data
end