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

Instance Method Details

#add_to_set(hash, options = nil) ⇒ Object Also known as: push_uniq



122
123
124
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 122

def add_to_set(hash, options=nil)
  self.class.push_uniq(id, hash, options)
end

#decrement(hash, options = nil) ⇒ Object



98
99
100
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 98

def decrement(hash, options=nil)
  self.class.decrement(id, hash, options)
end

#increment(hash, options = nil) ⇒ Object



94
95
96
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 94

def increment(hash, options=nil)
  self.class.increment(id, hash, options)
end

#pop(hash, options = nil) ⇒ Object



127
128
129
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 127

def pop(hash, options=nil)
  self.class.pop(id, hash, options)
end

#pull(hash, options = nil) ⇒ Object



114
115
116
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 114

def pull(hash, options=nil)
  self.class.pull(id, hash, options)
end

#pull_all(hash, options = nil) ⇒ Object



118
119
120
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 118

def pull_all(hash, options=nil)
  self.class.pull_all(id, hash, options)
end

#push(hash, options = nil) ⇒ Object



106
107
108
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 106

def push(hash, options=nil)
  self.class.push(id, hash, options)
end

#push_all(hash, options = nil) ⇒ Object



110
111
112
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 110

def push_all(hash, options=nil)
  self.class.push_all(id, hash, options)
end

#set(hash, options = nil) ⇒ Object



102
103
104
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 102

def set(hash, options=nil)
  self.class.set(id, hash, options)
end

#unset(*keys) ⇒ Object



90
91
92
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 90

def unset(*keys)
  self.class.unset(id, *keys)
end