Exception: Omise::Error

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ Error

Returns a new instance of Error.



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

def initialize(attributes)
  @code = attributes["code"]
  super("#{attributes["message"]} (#{@code})")
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



8
9
10
# File 'lib/omise/error.rb', line 8

def code
  @code
end