Class: CanTango::Configuration::Engines::Permission

Inherits:
Engine
  • Object
show all
Defined in:
lib/cantango/configuration/engines/permission.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Engine

#off?, #on?, #reset!, #set

Methods included from Modes

#mode=

Instance Attribute Details

#config_path(path = nil) ⇒ Object (readonly) Also known as: config_path=

Returns the value of attribute config_path.



22
23
24
# File 'lib/cantango/configuration/engines/permission.rb', line 22

def config_path
  @config_path
end

Instance Method Details

#modesObject



7
8
9
# File 'lib/cantango/configuration/engines/permission.rb', line 7

def modes
  @modes ||= [:cache]
end

#store {|@store| ... } ⇒ Object

Yields:



11
12
13
14
15
16
# File 'lib/cantango/configuration/engines/permission.rb', line 11

def store &block
  @store ||= ns::Store.new
  @store.default_class = CanTango::PermissionEngine::YamlStore
  yield @store if block
  @store
end

#typesObject



18
19
20
# File 'lib/cantango/configuration/engines/permission.rb', line 18

def types
  [:roles, :role_groups, :licenses, :users, :user_types, :account_types]
end