Module: MongoMapper::Plugins::Modifiers::InstanceMethods

Defined in:
lib/mongo_mapper/plugins/modifiers.rb

Instance Method Summary collapse

Instance Method Details

#add_to_set(hash) ⇒ Object Also known as: push_uniq



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

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

#decrement(hash) ⇒ Object



85
86
87
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 85

def decrement(hash)
  self.class.decrement(id, hash)
end

#increment(hash) ⇒ Object



81
82
83
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 81

def increment(hash)
  self.class.increment(id, hash)
end

#pop(hash) ⇒ Object



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

def pop(hash)
  self.class.pop(id, hash)
end

#pull(hash) ⇒ Object



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

def pull(hash)
  self.class.pull(id, hash)
end

#push(hash) ⇒ Object



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

def push(hash)
  self.class.push(id, hash)
end

#set(hash) ⇒ Object



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

def set(hash)
  self.class.set(id, hash)
end

#unset(*keys) ⇒ Object



77
78
79
# File 'lib/mongo_mapper/plugins/modifiers.rb', line 77

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