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