Class: Iterable::Response
- Inherits:
-
Object
- Object
- Iterable::Response
- Extended by:
- Forwardable
- Defined in:
- lib/iterable/response.rb
Overview
Response class is used to get access to raw HTTP request info
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
Instance Method Summary collapse
-
#success? ⇒ Boolean
Convenience method to determine if request was successfull or not.
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
12 13 14 |
# File 'lib/iterable/response.rb', line 12 def body @body end |
Instance Method Details
#success? ⇒ Boolean
Convenience method to determine if request was successfull or not
24 25 26 27 28 29 30 |
# File 'lib/iterable/response.rb', line 24 def success? case @resp.code.to_i when (200..299) then true else false end end |