Exception: Omise::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Omise::Error
- Defined in:
- lib/omise/error.rb
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Error
constructor
A new instance of Error.
- #to_s ⇒ Object
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"] = attributes["message"] end |
Instance Method Details
#to_s ⇒ Object
8 9 10 |
# File 'lib/omise/error.rb', line 8 def to_s "#{@message} (#{@code})" end |