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/inclusion.rb, line 11
def check_validity!
  unless [:include?, :call].any?{ |method| options[:in].respond_to?(method) }
    raise ArgumentError, ERROR_MESSAGE
  end
end
validate_each(record, attribute, value)
# File activemodel/lib/active_model/validations/inclusion.rb, line 17
def validate_each(record, attribute, value)
  delimiter = options[:in]
  exclusions = delimiter.respond_to?(:call) ? delimiter.call(record) : delimiter
  unless exclusions.send(inclusion_method(exclusions), value)
    record.errors.add(attribute, :inclusion, options.except(:in).merge!(:value => value))
  end
end