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



9
10
11
# File 'lib/mongo_mapper/plugins/identity_map.rb', line 9

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

.configure(model) ⇒ Object



13
14
15
# File 'lib/mongo_mapper/plugins/identity_map.rb', line 13

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

.modelsObject



5
6
7
# File 'lib/mongo_mapper/plugins/identity_map.rb', line 5

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