Class: Redd::Client::Response
- Inherits:
-
Struct
- Object
- Struct
- Redd::Client::Response
- Defined in:
- lib/redd/client.rb
Overview
Holds a returned HTTP response.
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#raw_body ⇒ Object
Returns the value of attribute raw_body.
Instance Method Summary collapse
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code
13 14 15 |
# File 'lib/redd/client.rb', line 13 def code @code end |
#headers ⇒ Object
Returns the value of attribute headers
13 14 15 |
# File 'lib/redd/client.rb', line 13 def headers @headers end |
#raw_body ⇒ Object
Returns the value of attribute raw_body
13 14 15 |
# File 'lib/redd/client.rb', line 13 def raw_body @raw_body end |
Instance Method Details
#body ⇒ Object
14 15 16 |
# File 'lib/redd/client.rb', line 14 def body @body ||= JSON.parse(raw_body, symbolize_names: true) end |