Module: MongoidExt::Modifiers
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/mongoid_ext/modifiers.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
- #decrement(update) ⇒ Object
- #increment(update) ⇒ Object
- #override(update) ⇒ Object
- #pop(update) ⇒ Object
- #pull(update) ⇒ Object
- #push(update) ⇒ Object
- #push_uniq(update) ⇒ Object
-
#unset(update) ⇒ Object
InstanceMethods.
Instance Method Details
#decrement(update) ⇒ Object
66 67 68 |
# File 'lib/mongoid_ext/modifiers.rb', line 66 def decrement(update) self.class.decrement({:_id => id}, update) end |
#increment(update) ⇒ Object
62 63 64 |
# File 'lib/mongoid_ext/modifiers.rb', line 62 def increment(update) self.class.increment({:_id => id}, update) end |
#override(update) ⇒ Object
70 71 72 |
# File 'lib/mongoid_ext/modifiers.rb', line 70 def override(update) self.class.override({:_id => id}, update) end |
#pop(update) ⇒ Object
86 87 88 |
# File 'lib/mongoid_ext/modifiers.rb', line 86 def pop(update) self.class.pop({:_id => id}, update) end |
#pull(update) ⇒ Object
78 79 80 |
# File 'lib/mongoid_ext/modifiers.rb', line 78 def pull(update) self.class.pull({:_id => id}, update) end |
#push(update) ⇒ Object
74 75 76 |
# File 'lib/mongoid_ext/modifiers.rb', line 74 def push(update) self.class.push({:_id => id}, update) end |
#push_uniq(update) ⇒ Object
82 83 84 |
# File 'lib/mongoid_ext/modifiers.rb', line 82 def push_uniq(update) self.class.push_uniq({:_id => id}, update) end |
#unset(update) ⇒ Object
InstanceMethods
58 59 60 |
# File 'lib/mongoid_ext/modifiers.rb', line 58 def unset(update) self.class.unset({:_id => id}, update) end |