class Braintree::Errors

Public Instance Methods

each(&block) click to toggle source
# File lib/braintree/errors.rb, line 9
def each(&block)
  @errors.deep_errors.each(&block)
end
for(scope) click to toggle source
# File lib/braintree/errors.rb, line 13
def for(scope)
  @errors.for(scope)
end
size() click to toggle source

Returns the total number of validation errors at all levels of nesting. For example, if creating a customer with a credit card and a billing address, and each of the customer, credit card, and billing address has 1 error, this method will return 3.

# File lib/braintree/errors.rb, line 24
def size
  @errors.deep_size
end