Class: ClickHouse::Client::Response
- Inherits:
-
Object
- Object
- ClickHouse::Client::Response
- Defined in:
- lib/click_house/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.
Instance Method Summary collapse
-
#initialize(body, http_status_code, headers = {}) ⇒ Response
constructor
A new instance of Response.
- #success? ⇒ Boolean
Constructor Details
#initialize(body, http_status_code, headers = {}) ⇒ Response
Returns a new instance of Response.
8 9 10 11 12 |
# File 'lib/click_house/client/response.rb', line 8 def initialize(body, http_status_code, headers = {}) @body = body @http_status_code = http_status_code @headers = headers end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
6 7 8 |
# File 'lib/click_house/client/response.rb', line 6 def body @body end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
6 7 8 |
# File 'lib/click_house/client/response.rb', line 6 def headers @headers end |
Instance Method Details
#success? ⇒ Boolean
14 15 16 |
# File 'lib/click_house/client/response.rb', line 14 def success? @http_status_code == 200 end |