Class: CanTango::PermissionEngine::MonetaStore

Inherits:
Store
  • Object
show all
Defined in:
lib/cantango/permission_engine/moneta_store.rb

Instance Attribute Summary collapse

Attributes inherited from Store

#name, #options

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Store

#save!

Constructor Details

#initialize(name, options = {}) ⇒ MonetaStore

for a YamlStore, the name is the name of the yml file



11
12
13
14
15
# File 'lib/cantango/permission_engine/moneta_store.rb', line 11

def initialize name, options = {}
  super
  @store = CanTango::Cache::MonetaCache.instance
  @store.configure_with options
end

Instance Attribute Details

#store(permissions) ⇒ Object (readonly)

one cache store is shared for all store instances (w different names)



8
9
10
# File 'lib/cantango/permission_engine/moneta_store.rb', line 8

def store
  @store
end

Class Method Details

.create(name, options = {}) ⇒ Object



17
18
19
# File 'lib/cantango/permission_engine/moneta_store.rb', line 17

def self.create name, options = {}
  super
end

Instance Method Details

#load!Object



21
22
23
# File 'lib/cantango/permission_engine/moneta_store.rb', line 21

def load!
  store.load! name
end