Class: Influxdb::Api::Client::Response
- Inherits:
-
Object
- Object
- Influxdb::Api::Client::Response
- Defined in:
- lib/influxdb/api/client/response.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status, body, headers = {}) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(status, body, headers = {}) ⇒ Response
Returns a new instance of Response.
7 8 9 10 |
# File 'lib/influxdb/api/client/response.rb', line 7 def initialize(status, body, headers = {}) @status, @body, @headers = status, body, headers @body = body.force_encoding('UTF-8') if body.respond_to?(:force_encoding) end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
5 6 7 |
# File 'lib/influxdb/api/client/response.rb', line 5 def body @body end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
5 6 7 |
# File 'lib/influxdb/api/client/response.rb', line 5 def headers @headers end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
5 6 7 |
# File 'lib/influxdb/api/client/response.rb', line 5 def status @status end |