Exception: Redd::APIError
- Inherits:
-
StandardError
- Object
- StandardError
- Redd::APIError
- Defined in:
- lib/redd/error.rb
Overview
An error with the API.
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response) ⇒ APIError
constructor
A new instance of APIError.
Constructor Details
#initialize(response) ⇒ APIError
Returns a new instance of APIError.
11 12 13 14 15 |
# File 'lib/redd/error.rb', line 11 def initialize(response) @response = response @name, = response.body[:json][:errors][0] super() end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
9 10 11 |
# File 'lib/redd/error.rb', line 9 def name @name end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
9 10 11 |
# File 'lib/redd/error.rb', line 9 def response @response end |