Class: Rester::Client::Response
- Inherits:
-
Hash
- Object
- Hash
- Rester::Client::Response
- Defined in:
- lib/rester/client/response.rb
Instance Method Summary collapse
-
#initialize(status, hash = {}) ⇒ Response
constructor
A new instance of Response.
- #successful? ⇒ Boolean
Constructor Details
#initialize(status, hash = {}) ⇒ Response
Returns a new instance of Response.
4 5 6 7 8 |
# File 'lib/rester/client/response.rb', line 4 def initialize(status, hash={}) @_status = status merge!(hash) _deep_freeze end |
Instance Method Details
#successful? ⇒ Boolean
10 11 12 |
# File 'lib/rester/client/response.rb', line 10 def successful? @_status && @_status.between?(200, 299) end |