Module: DocumentMapper::AttributeMethods::Read::ClassMethods
- Defined in:
- lib/document_mapper/attribute_methods.rb
Overview
included do
# Undefine id so it can be used as an attribute name
undef_method(:id) if method_defined?(:id)
end
Instance Method Summary collapse
Instance Method Details
#define_read_method(attr_name) ⇒ Object
14 15 16 17 18 |
# File 'lib/document_mapper/attribute_methods.rb', line 14 def define_read_method(attr_name) generated_attribute_methods.redefine_method(attr_name) do attributes[attr_name] end end |