Exception: Refocus::ApiError
- Inherits:
-
StandardError
- Object
- StandardError
- Refocus::ApiError
- Defined in:
- lib/refocus/errors.rb
Instance Attribute Summary collapse
-
#json ⇒ Object
readonly
Returns the value of attribute json.
Instance Method Summary collapse
-
#initialize(json) ⇒ ApiError
constructor
A new instance of ApiError.
Constructor Details
#initialize(json) ⇒ ApiError
Returns a new instance of ApiError.
4 5 6 7 |
# File 'lib/refocus/errors.rb', line 4 def initialize(json) @json = json super("#{json["errors"].first["message"]}:#{json["errors"].first["description"]}") end |
Instance Attribute Details
#json ⇒ Object (readonly)
Returns the value of attribute json.
3 4 5 |
# File 'lib/refocus/errors.rb', line 3 def json @json end |