Exception: ApiAuth::Client::ErrorWithJson
- Inherits:
-
StandardError
- Object
- StandardError
- ApiAuth::Client::ErrorWithJson
- Defined in:
- lib/api_auth/client/error_with_json.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#json ⇒ Object
Returns the value of attribute json.
-
#response ⇒ Object
Returns the value of attribute response.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(message = nil, response = nil, status = nil) ⇒ ErrorWithJson
constructor
A new instance of ErrorWithJson.
Constructor Details
#initialize(message = nil, response = nil, status = nil) ⇒ ErrorWithJson
Returns a new instance of ErrorWithJson.
8 9 10 11 12 13 |
# File 'lib/api_auth/client/error_with_json.rb', line 8 def initialize( = nil, response = nil, status = nil) super() self.response = response self.status = status || (response.is_a?(RestClient::Response) && response.code) self.json = response.to_json end |
Instance Attribute Details
#json ⇒ Object
Returns the value of attribute json.
6 7 8 |
# File 'lib/api_auth/client/error_with_json.rb', line 6 def json @json end |
#response ⇒ Object
Returns the value of attribute response.
6 7 8 |
# File 'lib/api_auth/client/error_with_json.rb', line 6 def response @response end |
#status ⇒ Object
Returns the value of attribute status.
6 7 8 |
# File 'lib/api_auth/client/error_with_json.rb', line 6 def status @status end |