Module: MarkMapper::Plugins::Modifiers
- Extended by:
- ActiveSupport::Concern
- Included in:
- Document
- Defined in:
- lib/mark_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
130 131 132 |
# File 'lib/mark_mapper/plugins/modifiers.rb', line 130 def add_to_set(hash, =nil) self.class.push_uniq({:_id => id}, hash, ) end |
#decrement(hash, options = nil) ⇒ Object
106 107 108 |
# File 'lib/mark_mapper/plugins/modifiers.rb', line 106 def decrement(hash, =nil) self.class.decrement({:_id => id}, hash, ) end |
#increment(hash, options = nil) ⇒ Object
102 103 104 |
# File 'lib/mark_mapper/plugins/modifiers.rb', line 102 def increment(hash, =nil) self.class.increment({:_id => id}, hash, ) end |
#pop(hash, options = nil) ⇒ Object
135 136 137 |
# File 'lib/mark_mapper/plugins/modifiers.rb', line 135 def pop(hash, =nil) self.class.pop({:_id => id}, hash, ) end |
#pull(hash, options = nil) ⇒ Object
122 123 124 |
# File 'lib/mark_mapper/plugins/modifiers.rb', line 122 def pull(hash, =nil) self.class.pull({:_id => id}, hash, ) end |
#pull_all(hash, options = nil) ⇒ Object
126 127 128 |
# File 'lib/mark_mapper/plugins/modifiers.rb', line 126 def pull_all(hash, =nil) self.class.pull_all({:_id => id}, hash, ) end |
#push(hash, options = nil) ⇒ Object
114 115 116 |
# File 'lib/mark_mapper/plugins/modifiers.rb', line 114 def push(hash, =nil) self.class.push({:_id => id}, hash, ) end |
#push_all(hash, options = nil) ⇒ Object
118 119 120 |
# File 'lib/mark_mapper/plugins/modifiers.rb', line 118 def push_all(hash, =nil) self.class.push_all({:_id => id}, hash, ) end |
#set(hash, options = nil) ⇒ Object
110 111 112 |
# File 'lib/mark_mapper/plugins/modifiers.rb', line 110 def set(hash, =nil) self.class.set({:_id => id}, hash, ) end |
#unset(*args) ⇒ Object
98 99 100 |
# File 'lib/mark_mapper/plugins/modifiers.rb', line 98 def unset(*args) self.class.unset({:_id => id}, *args) end |