Methods
Attributes
[R] | attributes | TODO Change this to private once we've dropped Ruby 2.2 support. Workaround for Ruby 2.2 “private attribute?” warning. |
Class Public methods
new(attributes)
Link
Instance Public methods
define_on(klass)
Link
# File activemodel/lib/active_model/validations/acceptance.rb, line 52 def define_on(klass) attr_readers = attributes.reject { |name| klass.attribute_method?(name) } attr_writers = attributes.reject { |name| klass.attribute_method?("#{name}=") } klass.send(:attr_reader, *attr_readers) klass.send(:attr_writer, *attr_writers) end