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