Class: Conduit::ApiResponse
- Inherits:
-
Object
- Object
- Conduit::ApiResponse
- Defined in:
- lib/conduit/api_response.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#parser ⇒ Object
readonly
Returns the value of attribute parser.
-
#raw_response ⇒ Object
readonly
Returns the value of attribute raw_response.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ ApiResponse
constructor
A new instance of ApiResponse.
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( = {}) @raw_response = [:raw_response] @body = [:body] ||= @raw_response.body @parser = [:parser] end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
3 4 5 |
# File 'lib/conduit/api_response.rb', line 3 def body @body end |
#parser ⇒ Object (readonly)
Returns the value of attribute parser.
3 4 5 |
# File 'lib/conduit/api_response.rb', line 3 def parser @parser end |
#raw_response ⇒ Object (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 |