attribute_method_prefix(*prefixes)
Instance Public methods
Declares a method available for all attributes with the given prefix. Uses
method_missing and respond_to? to rewrite the
method.
#{prefix}#{attr}(*args, &block)
to
#{prefix}attribute(#{attr}, *args, &block)
An instance method #{prefix}attribute must exist and accept at
least the attr argument.
class Person
include ActiveModel::AttributeMethods
attr_accessor :name
attribute_method_prefix 'clear_'
define_at