Module: MongoMapper::Plugins::IdentityMap

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

Defined Under Namespace

Modules: ClassMethods, InstanceMethods

Class Method Summary collapse

Class Method Details

.clearObject



8
9
10
# File 'lib/novelys_mongo_mapper/plugins/identity_map.rb', line 8

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

.configure(model) ⇒ Object



12
13
14
# File 'lib/novelys_mongo_mapper/plugins/identity_map.rb', line 12

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

.modelsObject



4
5
6
# File 'lib/novelys_mongo_mapper/plugins/identity_map.rb', line 4

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