Class: CanTango::Configuration::Engines::Cache
- Inherits:
-
Engine
- Object
- Engine
- CanTango::Configuration::Engines::Cache
show all
- Defined in:
- lib/cantango/configuration/engines/cache.rb
Instance Attribute Summary
Attributes inherited from Engine
#ability
Instance Method Summary
collapse
Methods inherited from Engine
#engine_name, #execute!, #initialize
#debug
Instance Method Details
#compile(state) ⇒ Object
6
7
8
9
|
# File 'lib/cantango/configuration/engines/cache.rb', line 6
def compile state
raise "Must be set to :on or :off" if ![:on, :off].include? state
@compile = state
end
|
#compile? ⇒ Boolean
11
12
13
14
|
# File 'lib/cantango/configuration/engines/cache.rb', line 11
def compile?
@compile ||= :on
@compile == :on
end
|
#store {|@store| ... } ⇒ Object
16
17
18
19
20
21
22
|
# File 'lib/cantango/configuration/engines/cache.rb', line 16
def store &block
@store ||= ns::Store.new
@store.default_class ||= CanTango::Ability::Cache::SessionCache
yield @store if block
@store
end
|