Class: Paymongo::PaymongoError
- Inherits:
-
Object
- Object
- Paymongo::PaymongoError
- Defined in:
- lib/paymongo/paymongo_error.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#detail ⇒ Object
readonly
Returns the value of attribute detail.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
-
#initialize(error) ⇒ PaymongoError
constructor
A new instance of PaymongoError.
Constructor Details
#initialize(error) ⇒ PaymongoError
Returns a new instance of PaymongoError.
7 8 9 10 11 |
# File 'lib/paymongo/paymongo_error.rb', line 7 def initialize(error) @code = error['code'] @detail = error['detail'] @source = error['source'] end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
3 4 5 |
# File 'lib/paymongo/paymongo_error.rb', line 3 def code @code end |
#detail ⇒ Object (readonly)
Returns the value of attribute detail.
3 4 5 |
# File 'lib/paymongo/paymongo_error.rb', line 3 def detail @detail end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
3 4 5 |
# File 'lib/paymongo/paymongo_error.rb', line 3 def source @source end |