method
initialize_generated_modules
v4.0.2 -
Show latest stable
- Class:
ActiveRecord::AttributeMethods::ClassMethods
initialize_generated_modules()public
No documentation available.
# File activerecord/lib/active_record/attribute_methods.rb, line 28
def initialize_generated_modules # :nodoc:
@generated_attribute_methods = Module.new {
extend Mutex_m
const_set :AttrNames, Module.new {
def self.set_name_cache(name, value)
const_name = "ATTR_#{name}"
unless const_defined? const_name
const_set const_name, value.dup.freeze
end
end
}
}
@attribute_methods_generated = false
include @generated_attribute_methods
end