Module: Elessar::ElessarResponseBase

Included in:
ElessarResponse
Defined in:
lib/elessar/elessar_response.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#http_headersObject

Returns the value of attribute http_headers.



20
21
22
# File 'lib/elessar/elessar_response.rb', line 20

def http_headers
  @http_headers
end

#http_statusObject

Returns the value of attribute http_status.



21
22
23
# File 'lib/elessar/elessar_response.rb', line 21

def http_status
  @http_status
end

Class Method Details

.populate_for_net_http(resp, http_resp) ⇒ Object



23
24
25
26
# File 'lib/elessar/elessar_response.rb', line 23

def self.populate_for_net_http(resp, http_resp)
  resp.http_headers = ElessarResponseHeaders.from_net_http(http_resp)
  resp.http_status = http_resp.code.to_i
end