Class: BatchApi::Response
- Inherits:
-
Object
- Object
- BatchApi::Response
- Defined in:
- lib/batch_api/response.rb
Overview
Public: a response from an internal operation in the Batch API. It contains all the details that are needed to describe the call’s outcome.
Instance Attribute Summary collapse
-
#body ⇒ Object
Public: the attributes of the HTTP response.
-
#headers ⇒ Object
Public: the attributes of the HTTP response.
-
#status ⇒ Object
Public: the attributes of the HTTP response.
Instance Method Summary collapse
-
#initialize(response) ⇒ Response
constructor
Public: create a new response representation from a Rack-compatible response (e.g. [status, headers, response_object]).
Constructor Details
#initialize(response) ⇒ Response
Public: create a new response representation from a Rack-compatible response (e.g. [status, headers, response_object]).
13 14 15 16 |
# File 'lib/batch_api/response.rb', line 13 def initialize(response) @status, @headers = *response @body = process_body(response[2]) end |
Instance Attribute Details
#body ⇒ Object
Public: the attributes of the HTTP response.
9 10 11 |
# File 'lib/batch_api/response.rb', line 9 def body @body end |
#headers ⇒ Object
Public: the attributes of the HTTP response.
9 10 11 |
# File 'lib/batch_api/response.rb', line 9 def headers @headers end |
#status ⇒ Object
Public: the attributes of the HTTP response.
9 10 11 |
# File 'lib/batch_api/response.rb', line 9 def status @status end |