Class: Ashmont::Errors
- Inherits:
-
Object
- Object
- Ashmont::Errors
- Defined in:
- lib/ashmont/errors.rb
Constant Summary collapse
- ERROR_MESSAGE_PREFIXES =
{ "number" => "Credit card number ", "CVV" => "CVV ", "expiration_month" => "Expiration month ", "expiration_year" => "Expiration year " }
Instance Method Summary collapse
-
#initialize(result, remote_errors) ⇒ Errors
constructor
A new instance of Errors.
- #to_hash ⇒ Object
Constructor Details
#initialize(result, remote_errors) ⇒ Errors
Returns a new instance of Errors.
10 11 12 13 14 |
# File 'lib/ashmont/errors.rb', line 10 def initialize(result, remote_errors) @errors = {} parse_result(result) parse_remote_errors(remote_errors) end |
Instance Method Details
#to_hash ⇒ Object
16 17 18 |
# File 'lib/ashmont/errors.rb', line 16 def to_hash @errors.dup end |