Module: MemModel::RootedStore::ClassMethods

Defined in:
lib/mem_model/rooted_store.rb

Instance Method Summary collapse

Instance Method Details

#rootObject



23
24
25
# File 'lib/mem_model/rooted_store.rb', line 23

def root
  @root ||= root_container::PERSISTENT_ROOT
end

#root_containerObject



14
15
16
# File 'lib/mem_model/rooted_store.rb', line 14

def root_container
  MemModel.maglev? ? Maglev : MemModel
end

#storeObject



18
19
20
21
# File 'lib/mem_model/rooted_store.rb', line 18

def store
  root[:MemModel] ||= {}
  root[:MemModel][name] ||= store_class.new
end

#store_classObject



10
11
12
# File 'lib/mem_model/rooted_store.rb', line 10

def store_class
  MemModel.maglev? ? IdentitySet : Set
end