Module: MemModel::RootedBase::ClassMethods

Defined in:
lib/mem_model/rooted_base.rb

Instance Method Summary collapse

Instance Method Details

#container_keyObject



16
17
18
# File 'lib/mem_model/rooted_base.rb', line 16

def container_key
  name.to_sym
end

#rootObject



25
26
27
# File 'lib/mem_model/rooted_base.rb', line 25

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

#root_containerObject



12
13
14
# File 'lib/mem_model/rooted_base.rb', line 12

def root_container
  MemModel.maglev? ? Maglev : MemModel
end

#storeObject



20
21
22
23
# File 'lib/mem_model/rooted_base.rb', line 20

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