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



124
125
126
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 124

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

#decrement(hash, options = nil) ⇒ Object



100
101
102
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 100

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

#increment(hash, options = nil) ⇒ Object



96
97
98
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 96

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

#pop(hash, options = nil) ⇒ Object



129
130
131
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 129

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

#pull(hash, options = nil) ⇒ Object



116
117
118
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 116

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

#pull_all(hash, options = nil) ⇒ Object



120
121
122
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 120

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

#push(hash, options = nil) ⇒ Object



108
109
110
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 108

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

#push_all(hash, options = nil) ⇒ Object



112
113
114
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 112

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

#set(hash, options = nil) ⇒ Object



104
105
106
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 104

def set(hash, options=nil)
  self.class.set(id, hash, options)
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