Class: Machina::IdentityClient::Response
- Inherits:
-
Struct
- Object
- Struct
- Machina::IdentityClient::Response
- Defined in:
- lib/machina/identity_client.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
7 8 9 |
# File 'lib/machina/identity_client.rb', line 7 def body @body end |
#status ⇒ Object
Returns the value of attribute status
7 8 9 |
# File 'lib/machina/identity_client.rb', line 7 def status @status end |
Instance Method Details
#parsed ⇒ Object
12 13 14 |
# File 'lib/machina/identity_client.rb', line 12 def parsed body.is_a?(Hash) ? body : JSON.parse(body) end |
#success? ⇒ Boolean
8 9 10 |
# File 'lib/machina/identity_client.rb', line 8 def success? status.between?(200, 299) end |