Exception: Skydrive::APIResponseErrorException
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Skydrive::APIResponseErrorException
- Defined in:
- lib/skydrive.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response) ⇒ APIResponseErrorException
constructor
A new instance of APIResponseErrorException.
Constructor Details
#initialize(response) ⇒ APIResponseErrorException
Returns a new instance of APIResponseErrorException.
14 15 16 17 18 19 |
# File 'lib/skydrive.rb', line 14 def initialize(response) @response = response @code = response['error'] @description = response['error_description'] super("#{@code}: #{@description}\n#{response}") end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
13 14 15 |
# File 'lib/skydrive.rb', line 13 def code @code end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
13 14 15 |
# File 'lib/skydrive.rb', line 13 def description @description end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
13 14 15 |
# File 'lib/skydrive.rb', line 13 def response @response end |