Class: InfinumAzure::Users::Response
- Inherits:
-
Object
- Object
- InfinumAzure::Users::Response
- Defined in:
- lib/tasks/infinum_azure/users/response.rb
Instance Attribute Summary collapse
-
#raw_response ⇒ Object
readonly
Returns the value of attribute raw_response.
Instance Method Summary collapse
- #body ⇒ Object
-
#initialize(raw_response) ⇒ Response
constructor
A new instance of Response.
- #success? ⇒ Boolean
Constructor Details
#initialize(raw_response) ⇒ Response
Returns a new instance of Response.
8 9 10 |
# File 'lib/tasks/infinum_azure/users/response.rb', line 8 def initialize(raw_response) @raw_response = raw_response end |
Instance Attribute Details
#raw_response ⇒ Object (readonly)
Returns the value of attribute raw_response.
6 7 8 |
# File 'lib/tasks/infinum_azure/users/response.rb', line 6 def raw_response @raw_response end |
Instance Method Details
#body ⇒ Object
16 17 18 |
# File 'lib/tasks/infinum_azure/users/response.rb', line 16 def body @body ||= success? ? success_json : error_json end |
#success? ⇒ Boolean
12 13 14 |
# File 'lib/tasks/infinum_azure/users/response.rb', line 12 def success? raw_response.is_a?(Net::HTTPSuccess) end |