Class: Response
- Inherits:
-
Object
- Object
- Response
- Defined in:
- lib/response.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#code ⇒ Object
Returns the value of attribute code.
-
#cookies ⇒ Object
Returns the value of attribute cookies.
-
#headers ⇒ Object
Returns the value of attribute headers.
Instance Method Summary collapse
-
#initialize(code: 200, body: '', headers: {}, cookies: {}) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(code: 200, body: '', headers: {}, cookies: {}) ⇒ Response
Returns a new instance of Response.
6 7 8 9 10 11 |
# File 'lib/response.rb', line 6 def initialize(code: 200, body: '', headers: {}, cookies: {}) @code = code @body = body @headers = headers @cookies = end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
4 5 6 |
# File 'lib/response.rb', line 4 def body @body end |
#code ⇒ Object
Returns the value of attribute code.
4 5 6 |
# File 'lib/response.rb', line 4 def code @code end |
#cookies ⇒ Object
Returns the value of attribute cookies.
4 5 6 |
# File 'lib/response.rb', line 4 def @cookies end |
#headers ⇒ Object
Returns the value of attribute headers.
4 5 6 |
# File 'lib/response.rb', line 4 def headers @headers end |