| Class | ActiveMerchant::Validateable::Errors |
| In: |
lib/active_merchant/lib/validateable.rb
|
| Parent: | HashWithIndifferentAccess |
This hash keeps the errors of the object
# File lib/active_merchant/lib/validateable.rb, line 33
33: def initialize(base)
34: @base = base
35: end
# File lib/active_merchant/lib/validateable.rb, line 48
48: def add(field, error)
49: self[field] ||= []
50: self[field] << error
51: end
# File lib/active_merchant/lib/validateable.rb, line 53
53: def add_to_base(error)
54: add(:base, error)
55: end
# File lib/active_merchant/lib/validateable.rb, line 57
57: def each_full
58: full_messages.each { |msg| yield msg }
59: end