Exception: Battlenet::ApiException
- Inherits:
-
Exception
- Object
- Exception
- Battlenet::ApiException
- Defined in:
- lib/battlenet/exceptions/api_exception.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#reason ⇒ Object
Returns the value of attribute reason.
-
#response ⇒ Object
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response) ⇒ ApiException
constructor
A new instance of ApiException.
Constructor Details
#initialize(response) ⇒ ApiException
Returns a new instance of ApiException.
5 6 7 8 9 |
# File 'lib/battlenet/exceptions/api_exception.rb', line 5 def initialize(response) @response = response @code = response.code @reason = response['reason'] || nil end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
3 4 5 |
# File 'lib/battlenet/exceptions/api_exception.rb', line 3 def code @code end |
#reason ⇒ Object
Returns the value of attribute reason.
3 4 5 |
# File 'lib/battlenet/exceptions/api_exception.rb', line 3 def reason @reason end |
#response ⇒ Object
Returns the value of attribute response.
3 4 5 |
# File 'lib/battlenet/exceptions/api_exception.rb', line 3 def response @response end |