Class: Pubnub::HttpResponse

Inherits:
Object show all
Defined in:
lib/pubnub/http_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#bodyObject (readonly)

Returns the value of attribute body.



3
4
5
# File 'lib/pubnub/http_response.rb', line 3

def body
  @body
end

#codeObject (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_versionObject (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