Module: MongoMapper::Plugins::Modifiers
- Extended by:
- ActiveSupport::Concern
- Included in:
- Document
- Defined in:
- lib/mongo_mapper/plugins/modifiers.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
- #add_to_set(hash, options = nil) ⇒ Object (also: #push_uniq)
- #decrement(hash, options = nil) ⇒ Object
- #increment(hash, options = nil) ⇒ Object
- #pop(hash, options = nil) ⇒ Object
- #pull(hash, options = nil) ⇒ Object
- #pull_all(hash, options = nil) ⇒ Object
- #push(hash, options = nil) ⇒ Object
- #push_all(hash, options = nil) ⇒ Object
- #set(hash, options = nil) ⇒ Object
- #unset(*args) ⇒ Object
Instance Method Details
#add_to_set(hash, options = nil) ⇒ Object Also known as: push_uniq
124 125 126 |
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 124 def add_to_set(hash, =nil) self.class.push_uniq(id, hash, ) end |
#decrement(hash, options = nil) ⇒ Object
100 101 102 |
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 100 def decrement(hash, =nil) self.class.decrement(id, hash, ) end |
#increment(hash, options = nil) ⇒ Object
96 97 98 |
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 96 def increment(hash, =nil) self.class.increment(id, hash, ) end |
#pop(hash, options = nil) ⇒ Object
129 130 131 |
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 129 def pop(hash, =nil) self.class.pop(id, hash, ) end |
#pull(hash, options = nil) ⇒ Object
116 117 118 |
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 116 def pull(hash, =nil) self.class.pull(id, hash, ) end |
#pull_all(hash, options = nil) ⇒ Object
120 121 122 |
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 120 def pull_all(hash, =nil) self.class.pull_all(id, hash, ) end |
#push(hash, options = nil) ⇒ Object
108 109 110 |
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 108 def push(hash, =nil) self.class.push(id, hash, ) end |
#push_all(hash, options = nil) ⇒ Object
112 113 114 |
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 112 def push_all(hash, =nil) self.class.push_all(id, hash, ) end |
#set(hash, options = nil) ⇒ Object
104 105 106 |
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 104 def set(hash, =nil) self.class.set(id, hash, ) end |
#unset(*args) ⇒ Object
92 93 94 |
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 92 def unset(*args) self.class.unset(id, *args) end |