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
100 101 102 |
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 100 def add_to_set(hash) self.class.push_uniq(id, hash) end |
#decrement(hash) ⇒ Object
84 85 86 |
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 84 def decrement(hash) self.class.decrement(id, hash) end |
#increment(hash) ⇒ Object
80 81 82 |
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 80 def increment(hash) self.class.increment(id, hash) end |
#pop(hash) ⇒ Object
105 106 107 |
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 105 def pop(hash) self.class.pop(id, hash) end |
#pull(hash) ⇒ Object
96 97 98 |
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 96 def pull(hash) self.class.pull(id, hash) end |
#push(hash) ⇒ Object
92 93 94 |
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 92 def push(hash) self.class.push(id, hash) end |
#set(hash) ⇒ Object
88 89 90 |
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 88 def set(hash) self.class.set(id, hash) end |
#unset(*keys) ⇒ Object
76 77 78 |
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 76 def unset(*keys) self.class.unset(id, *keys) end |