module MongoModel::AttributeMethods::Write
Public Instance Methods
[]=(name, value)
click to toggle source
Updates the attribute identified by name
with the specified value
. (Alias for the protected write_attribute
method).
# File lib/mongomodel/concerns/attribute_methods/write.rb, line 18 def []=(name, value) write_attribute(name, value) end
write_attribute(name, value)
click to toggle source
Updates the attribute identified by name
with the specified value
. Values are typecast to the appropriate type determined by the property.
# File lib/mongomodel/concerns/attribute_methods/write.rb, line 12 def write_attribute(name, value) attributes[name.to_sym] = value end
Private Instance Methods
attribute=(attribute_name, value)
click to toggle source
Handle *= for method_missing.
# File lib/mongomodel/concerns/attribute_methods/write.rb, line 24 def attribute=(attribute_name, value) write_attribute(attribute_name, value) end