Class: Signable::Query::Response
- Inherits:
-
Struct
- Object
- Struct
- Signable::Query::Response
- Defined in:
- lib/signable/query/response.rb
Instance Attribute Summary collapse
-
#http_response ⇒ Object
Returns the value of attribute http_response.
Instance Method Summary collapse
Instance Attribute Details
#http_response ⇒ Object
Returns the value of attribute http_response
3 4 5 |
# File 'lib/signable/query/response.rb', line 3 def http_response @http_response end |
Instance Method Details
#object ⇒ Object
9 10 11 |
# File 'lib/signable/query/response.rb', line 9 def object @object ||= JSON.parse(http_response.body) end |
#ok? ⇒ Boolean
5 6 7 |
# File 'lib/signable/query/response.rb', line 5 def ok? [200, 202].include?(http_response.code.to_i) end |