Module: MongoMapper::Plugins::IdentityMap

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

Defined Under Namespace

Modules: ClassMethods, InstanceMethods

Class Method Summary collapse

Class Method Details

.clearObject



11
12
13
# File 'lib/mongo_mapper/plugins/identity_map.rb', line 11

def self.clear
  models.each { |m| m.identity_map.clear }
end

.configure(model) ⇒ Object



15
16
17
# File 'lib/mongo_mapper/plugins/identity_map.rb', line 15

def self.configure(model)
  IdentityMap.models << model
end

.modelsObject



7
8
9
# File 'lib/mongo_mapper/plugins/identity_map.rb', line 7

def self.models
  @models ||= Set.new
end