Exception: Omise::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Omise::Error
- Defined in:
- lib/omise/error.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Error
constructor
A new instance of Error.
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
#code ⇒ Object (readonly)
Returns the value of attribute code.
8 9 10 |
# File 'lib/omise/error.rb', line 8 def code @code end |