method
define_method_attribute=
v6.0.0 -
Show latest stable
- Class:
ActiveModel::Attributes::ClassMethods
define_method_attribute=(name)private
No documentation available.
# File activemodel/lib/active_model/attributes.rb, line 46
def define_method_attribute=(name)
ActiveModel::AttributeMethods::AttrNames.define_attribute_accessor_method(
generated_attribute_methods, name, writer: true,
) do |temp_method_name, attr_name_expr|
generated_attribute_methods.module_eval def #{temp_method_name}(value) name = #{attr_name_expr} write_attribute(name, value) end, __FILE__, __LINE__ + 1
end
end