Class: Service::Client::Response
- Inherits:
-
Object
- Object
- Service::Client::Response
- Includes:
- BaseResponse
- Defined in:
- lib/service-client/response.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
-
#initialize(raw_response) ⇒ Response
constructor
A new instance of Response.
Methods included from BaseResponse
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
#data ⇒ Object (readonly)
Returns the value of attribute data.
6 7 8 |
# File 'lib/service-client/response.rb', line 6 def data @data end |