Module: PersonName::ActiveRecord::Core::ClassMethods

Defined in:
lib/person_name.rb

Instance Method Summary collapse

Instance Method Details

#initialize_person_namesObject



46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/person_name.rb', line 46

def initialize_person_names
	name_types.map(&:to_s).each do |name_type|
		class_eval %(
			def #{name_type}
				person_name_for('#{name_type}')
			end

			def #{name_type}= new_name
				set_person_name_for('#{name_type}', new_name)
			end
		)
	end
end