Module: MongoMapper::Plugins::Modifiers::InstanceMethods
- Defined in:
- lib/mongo_mapper/plugins/modifiers.rb
Instance Method Summary collapse
- #add_to_set(hash) ⇒ Object (also: #push_uniq)
- #decrement(hash) ⇒ Object
- #increment(hash) ⇒ Object
- #pop(hash) ⇒ Object
- #pull(hash) ⇒ Object
- #push(hash) ⇒ Object
- #set(hash) ⇒ Object
- #unset(*keys) ⇒ Object
Instance Method Details
#add_to_set(hash) ⇒ Object Also known as: push_uniq
103 104 105 |
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 103 def add_to_set(hash) self.class.push_uniq(id, hash) end |
#decrement(hash) ⇒ Object
87 88 89 |
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 87 def decrement(hash) self.class.decrement(id, hash) end |
#increment(hash) ⇒ Object
83 84 85 |
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 83 def increment(hash) self.class.increment(id, hash) end |
#pop(hash) ⇒ Object
108 109 110 |
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 108 def pop(hash) self.class.pop(id, hash) end |
#pull(hash) ⇒ Object
99 100 101 |
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 99 def pull(hash) self.class.pull(id, hash) end |
#push(hash) ⇒ Object
95 96 97 |
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 95 def push(hash) self.class.push(id, hash) end |
#set(hash) ⇒ Object
91 92 93 |
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 91 def set(hash) self.class.set(id, hash) end |
#unset(*keys) ⇒ Object
79 80 81 |
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 79 def unset(*keys) self.class.unset(id, *keys) end |