Class: Conduit::ApiResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/conduit/api_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ ApiResponse

Returns a new instance of ApiResponse.



5
6
7
8
9
# File 'lib/conduit/api_response.rb', line 5

def initialize(options = {})
  @raw_response = options[:raw_response]
  @body         = options[:body] ||= @raw_response.body
  @parser       = options[:parser]
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



3
4
5
# File 'lib/conduit/api_response.rb', line 3

def body
  @body
end

#parserObject (readonly)

Returns the value of attribute parser.



3
4
5
# File 'lib/conduit/api_response.rb', line 3

def parser
  @parser
end

#raw_responseObject (readonly)

Returns the value of attribute raw_response.



3
4
5
# File 'lib/conduit/api_response.rb', line 3

def raw_response
  @raw_response
end