class Apia::ErrorSet
Public Instance Methods
validate(errors, object)
click to toggle source
# File lib/apia/error_set.rb, line 6 def validate(errors, object) each_with_index do |error, index| unless error.respond_to?(:ancestors) && error.ancestors.include?(Apia::Error) errors.add object, 'InvalidPotentialError', "Potential error at index #{index} must be a class that inherits from Apia::Error" end end end