Exception: Supercamp::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Supercamp::Error
- Defined in:
- lib/supercamp/error.rb
Instance Attribute Summary collapse
-
#api_code ⇒ Object
readonly
Returns the value of attribute api_code.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#criteria ⇒ Object
readonly
Returns the value of attribute criteria.
Instance Method Summary collapse
-
#initialize(criteria, response) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(criteria, response) ⇒ Error
Returns a new instance of Error.
9 10 11 12 13 14 |
# File 'lib/supercamp/error.rb', line 9 def initialize(criteria, response) @code = response.[:code] @api_code = response.[:headers]["X-Mashery-Error-Code"] @criteria = criteria super(response.body) end |
Instance Attribute Details
#api_code ⇒ Object (readonly)
Returns the value of attribute api_code.
6 7 8 |
# File 'lib/supercamp/error.rb', line 6 def api_code @api_code end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
5 6 7 |
# File 'lib/supercamp/error.rb', line 5 def code @code end |
#criteria ⇒ Object (readonly)
Returns the value of attribute criteria.
7 8 9 |
# File 'lib/supercamp/error.rb', line 7 def criteria @criteria end |