Exception: LosantRest::ResponseError
- Inherits:
-
StandardError
- Object
- StandardError
- LosantRest::ResponseError
- Defined in:
- lib/losant_rest/error.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(code, result) ⇒ ResponseError
constructor
A new instance of ResponseError.
Constructor Details
#initialize(code, result) ⇒ ResponseError
Returns a new instance of ResponseError.
28 29 30 31 32 |
# File 'lib/losant_rest/error.rb', line 28 def initialize(code, result) @code = code @type = result["type"] super(result["message"]) end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
25 26 27 |
# File 'lib/losant_rest/error.rb', line 25 def code @code end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
26 27 28 |
# File 'lib/losant_rest/error.rb', line 26 def type @type end |