Exception: Refocus::ApiError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/refocus/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#jsonObject (readonly)

Returns the value of attribute json.



3
4
5
# File 'lib/refocus/errors.rb', line 3

def json
  @json
end