Class: Jetra::Response
- Inherits:
-
Object
- Object
- Jetra::Response
- Defined in:
- lib/jetra/base.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
- #finish ⇒ Object
-
#initialize(status = nil, body = nil, headers = nil) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(status = nil, body = nil, headers = nil) ⇒ Response
Returns a new instance of Response.
25 26 27 28 29 |
# File 'lib/jetra/base.rb', line 25 def initialize(status=nil, body=nil, headers=nil) @status = status.to_i @body = body @headers = headers end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
23 24 25 |
# File 'lib/jetra/base.rb', line 23 def body @body end |
#headers ⇒ Object
Returns the value of attribute headers.
23 24 25 |
# File 'lib/jetra/base.rb', line 23 def headers @headers end |
#status ⇒ Object
Returns the value of attribute status.
23 24 25 |
# File 'lib/jetra/base.rb', line 23 def status @status end |
Instance Method Details
#finish ⇒ Object
31 32 33 |
# File 'lib/jetra/base.rb', line 31 def finish self.freeze end |