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.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
- #finish ⇒ Object
-
#initialize(status = 0, body = nil) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(status = 0, body = nil) ⇒ Response
Returns a new instance of Response.
23 24 25 26 |
# File 'lib/jetra/base.rb', line 23 def initialize(status=0, body=nil) @status = status.to_i @body = body end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
21 22 23 |
# File 'lib/jetra/base.rb', line 21 def body @body end |
#status ⇒ Object
Returns the value of attribute status.
21 22 23 |
# File 'lib/jetra/base.rb', line 21 def status @status end |
Instance Method Details
#finish ⇒ Object
28 29 30 |
# File 'lib/jetra/base.rb', line 28 def finish self.freeze end |