module MongoModel::AttributeMethods::ClassMethods
Public Instance Methods
attribute_methods_generated?()
click to toggle source
# File lib/mongomodel/concerns/attribute_methods.rb, line 17 def attribute_methods_generated? @attribute_methods_generated ||= false end
define_attribute_methods()
click to toggle source
Generates all the attribute related methods for defined properties accessors, mutators and query methods.
Calls superclass method
# File lib/mongomodel/concerns/attribute_methods.rb, line 10 def define_attribute_methods return if attribute_methods_generated? superclass.define_attribute_methods unless abstract_class? super(properties.keys) @attribute_methods_generated = true end
property(*args)
click to toggle source
Calls superclass method
# File lib/mongomodel/concerns/attribute_methods.rb, line 26 def property(*args) property = super undefine_attribute_methods property end
undefine_attribute_methods(*args)
click to toggle source
Calls superclass method
# File lib/mongomodel/concerns/attribute_methods.rb, line 21 def undefine_attribute_methods(*args) super @attribute_methods_generated = false end
Protected Instance Methods
instance_method_already_implemented?(method_name)
click to toggle source
Calls superclass method
# File lib/mongomodel/concerns/attribute_methods.rb, line 33 def instance_method_already_implemented?(method_name) method_defined?(method_name) || private_method_defined?(method_name) || super end