Exception: Smarteru::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/smarteru/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#codeObject (readonly)

Returns the value of attribute code.



3
4
5
# File 'lib/smarteru/error.rb', line 3

def code
  @code
end

#responseObject (readonly)

Returns the value of attribute response.



3
4
5
# File 'lib/smarteru/error.rb', line 3

def response
  @response
end