Class: Pubnub::HttpResponse
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#code ⇒ Object
(also: #status_code)
readonly
Returns the value of attribute code.
-
#http_version ⇒ Object
readonly
Returns the value of attribute http_version.
Instance Method Summary collapse
-
#initialize(httpx_response) ⇒ HttpResponse
constructor
A new instance of HttpResponse.
Constructor Details
#initialize(httpx_response) ⇒ HttpResponse
Returns a new instance of HttpResponse.
6 7 8 9 10 |
# File 'lib/pubnub/http_response.rb', line 6 def initialize(httpx_response) @code = httpx_response.status @body = httpx_response.body.to_s @http_version = httpx_response.version end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
3 4 5 |
# File 'lib/pubnub/http_response.rb', line 3 def body @body end |
#code ⇒ Object (readonly) Also known as: status_code
Returns the value of attribute code.
3 4 5 |
# File 'lib/pubnub/http_response.rb', line 3 def code @code end |
#http_version ⇒ Object (readonly)
Returns the value of attribute http_version.
3 4 5 |
# File 'lib/pubnub/http_response.rb', line 3 def http_version @http_version end |