Class: Kraftwerk::Response
- Inherits:
-
Object
- Object
- Kraftwerk::Response
- Defined in:
- lib/kraftwerk/response.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#body_raw ⇒ Object
readonly
Returns the value of attribute body_raw.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
Instance Method Summary collapse
-
#initialize(code: nil, body: nil, headers: {}, body_raw: false) ⇒ Response
constructor
TODO: support cookies nicely.
Constructor Details
#initialize(code: nil, body: nil, headers: {}, body_raw: false) ⇒ Response
TODO: support cookies nicely
6 7 8 9 10 11 |
# File 'lib/kraftwerk/response.rb', line 6 def initialize(code: nil, body: nil, headers: {}, body_raw: false) @code = code @body = body @headers = headers @body_raw = body_raw end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
3 4 5 |
# File 'lib/kraftwerk/response.rb', line 3 def body @body end |
#body_raw ⇒ Object (readonly)
Returns the value of attribute body_raw.
3 4 5 |
# File 'lib/kraftwerk/response.rb', line 3 def body_raw @body_raw end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
3 4 5 |
# File 'lib/kraftwerk/response.rb', line 3 def code @code end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
3 4 5 |
# File 'lib/kraftwerk/response.rb', line 3 def headers @headers end |