Class: Algolia::Http::Response
- Inherits:
-
Object
- Object
- Algolia::Http::Response
- Defined in:
- lib/algolia/http/response.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#has_timed_out ⇒ Object
readonly
Returns the value of attribute has_timed_out.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#network_failure ⇒ Object
readonly
Returns the value of attribute network_failure.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(opts = {}) ⇒ Response
Returns a new instance of Response.
13 14 15 16 17 18 19 20 |
# File 'lib/algolia/http/response.rb', line 13 def initialize(opts = {}) @status = opts[:status] @body = opts[:body] || '' @error = opts[:error] || '' @headers = opts[:headers] || '' @has_timed_out = opts[:has_timed_out] || false @network_failure = opts[:network_failure] || false end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
4 5 6 |
# File 'lib/algolia/http/response.rb', line 4 def body @body end |
#error ⇒ Object (readonly)
Returns the value of attribute error.
4 5 6 |
# File 'lib/algolia/http/response.rb', line 4 def error @error end |
#has_timed_out ⇒ Object (readonly)
Returns the value of attribute has_timed_out.
4 5 6 |
# File 'lib/algolia/http/response.rb', line 4 def has_timed_out @has_timed_out end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
4 5 6 |
# File 'lib/algolia/http/response.rb', line 4 def headers @headers end |
#network_failure ⇒ Object (readonly)
Returns the value of attribute network_failure.
4 5 6 |
# File 'lib/algolia/http/response.rb', line 4 def network_failure @network_failure end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
4 5 6 |
# File 'lib/algolia/http/response.rb', line 4 def status @status end |