Methods
C
V
Constants
ERROR_MESSAGE = "An object with the method #include? or a proc or lambda is required, " << "and must be supplied as the :in option of the configuration hash"
Instance Public methods
check_validity!()
    # File activemodel/lib/active_model/validations/exclusion.rb, line 10
10:       def check_validity!
11:         unless [:include?, :call].any? { |method| options[:in].respond_to?(method) }
12:           raise ArgumentError, ERROR_MESSAGE
13:         end
14:       end
validate_each(record, attribute, value)
    # File activemodel/lib/active_model/validations/exclusion.rb, line 16
16:       def validate_each(record, attribute, value)
17:         delimiter = options[:in]
18:         exclusions = delimiter.respond_to?(:call) ? delimiter.call(record) : delimiter
19:         if exclusions.send(inclusion_method(exclusions), value)
20:           record.errors.add(attribute, :exclusion, options.except(:in).merge!(:value => value))
21:         end
22:       end