Class: Hermetic::Transport::Http::Response
- Inherits:
-
Struct
- Object
- Struct
- Hermetic::Transport::Http::Response
- Defined in:
- lib/hermetic/transport/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
13 14 15 |
# File 'lib/hermetic/transport/http.rb', line 13 def body @body end |
#status ⇒ Object
Returns the value of attribute status
13 14 15 |
# File 'lib/hermetic/transport/http.rb', line 13 def status @status end |
Instance Method Details
#json ⇒ Object
14 |
# File 'lib/hermetic/transport/http.rb', line 14 def json = JSON.parse(body) |
#success? ⇒ Boolean
16 |
# File 'lib/hermetic/transport/http.rb', line 16 def success? = (200..299).cover?(status) |