Class: Brauchbar::Response
- Inherits:
-
String
- Object
- String
- Brauchbar::Response
- Defined in:
- lib/brauchbar/response.rb
Instance Attribute Summary collapse
-
#raw_body ⇒ Object
(also: #body)
readonly
Returns the value of attribute raw_body.
-
#raw_headers ⇒ Object
(also: #headers)
readonly
Returns the value of attribute raw_headers.
-
#raw_status ⇒ Object
(also: #status)
readonly
Returns the value of attribute raw_status.
Instance Method Summary collapse
-
#initialize(response) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(response) ⇒ Response
Returns a new instance of Response.
4 5 6 7 8 9 10 11 |
# File 'lib/brauchbar/response.rb', line 4 def initialize(response) @raw_status = response.status @raw_body = response.body @raw_headers = response.headers # no need to overwrite to_s :) super(body) end |
Instance Attribute Details
#raw_body ⇒ Object (readonly) Also known as: body
Returns the value of attribute raw_body.
2 3 4 |
# File 'lib/brauchbar/response.rb', line 2 def raw_body @raw_body end |
#raw_headers ⇒ Object (readonly) Also known as: headers
Returns the value of attribute raw_headers.
2 3 4 |
# File 'lib/brauchbar/response.rb', line 2 def raw_headers @raw_headers end |
#raw_status ⇒ Object (readonly) Also known as: status
Returns the value of attribute raw_status.
2 3 4 |
# File 'lib/brauchbar/response.rb', line 2 def raw_status @raw_status end |