Exception: Smarteru::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Smarteru::Error
- Defined in:
- lib/smarteru/error.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(response) ⇒ Error
Returns a new instance of Error.
5 6 7 8 9 |
# File 'lib/smarteru/error.rb', line 5 def initialize(response) @response = response @code = response.error[:error][:error_id] super(response.error[:error][:error_message]) end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
3 4 5 |
# File 'lib/smarteru/error.rb', line 3 def code @code end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
3 4 5 |
# File 'lib/smarteru/error.rb', line 3 def response @response end |