Class: Elessar::ElessarResponse
- Inherits:
-
Object
- Object
- Elessar::ElessarResponse
- Includes:
- ElessarResponseBase
- Defined in:
- lib/elessar/elessar_response.rb
Constant Summary collapse
- Headers =
ElessarResponseHeaders
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#http_body ⇒ Object
Returns the value of attribute http_body.
Attributes included from ElessarResponseBase
Class Method Summary collapse
Methods included from ElessarResponseBase
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
32 33 34 |
# File 'lib/elessar/elessar_response.rb', line 32 def data @data end |
#http_body ⇒ Object
Returns the value of attribute http_body.
33 34 35 |
# File 'lib/elessar/elessar_response.rb', line 33 def http_body @http_body end |
Class Method Details
.from_net_http(http_resp) ⇒ Object
35 36 37 38 39 40 41 |
# File 'lib/elessar/elessar_response.rb', line 35 def self.from_net_http(http_resp) resp = ElessarResponse.new resp.data = JSON.parse(http_resp.body, object_class: OpenStruct) resp.http_body = http_resp.body ElessarResponseBase.populate_for_net_http(resp, http_resp) resp end |