Exception: Sqwiggle::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Sqwiggle::Error
- Defined in:
- lib/sqwiggle/error.rb
Instance Attribute Summary collapse
-
#error_type ⇒ Object
readonly
Returns the value of attribute error_type.
-
#param ⇒ Object
readonly
Returns the value of attribute param.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(response) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(response) ⇒ Error
Returns a new instance of Error.
8 9 10 11 12 13 14 |
# File 'lib/sqwiggle/error.rb', line 8 def initialize(response) h = JSON.parse(response.body) @status = response.status @type = h['type'] @param = h['param'] super() end |
Instance Attribute Details
#error_type ⇒ Object (readonly)
Returns the value of attribute error_type.
5 6 7 |
# File 'lib/sqwiggle/error.rb', line 5 def error_type @error_type end |
#param ⇒ Object (readonly)
Returns the value of attribute param.
6 7 8 |
# File 'lib/sqwiggle/error.rb', line 6 def param @param end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
4 5 6 |
# File 'lib/sqwiggle/error.rb', line 4 def status @status end |