Class: Tempest::HTTP::Response
- Inherits:
-
Struct
- Object
- Struct
- Tempest::HTTP::Response
- Defined in:
- lib/tempest/http.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
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body
15 16 17 |
# File 'lib/tempest/http.rb', line 15 def body @body end |
#status ⇒ Object
Returns the value of attribute status
15 16 17 |
# File 'lib/tempest/http.rb', line 15 def status @status end |
Instance Method Details
#ok? ⇒ Boolean
16 17 18 |
# File 'lib/tempest/http.rb', line 16 def ok? status >= 200 && status < 300 end |
#unauthorized? ⇒ Boolean
20 21 22 |
# File 'lib/tempest/http.rb', line 20 def status == 401 end |