Class: CanTango::Ability::Cache::Reader
- Inherits:
-
Object
- Object
- CanTango::Ability::Cache::Reader
- Includes:
- Helpers::Debug
- Defined in:
- lib/cantango/ability/cache/reader.rb
Instance Attribute Summary collapse
-
#cache ⇒ Object
readonly
Returns the value of attribute cache.
Instance Method Summary collapse
-
#initialize(cache) ⇒ Reader
constructor
A new instance of Reader.
- #prepared_rules ⇒ Object
Methods included from Helpers::Debug
Constructor Details
#initialize(cache) ⇒ Reader
Returns a new instance of Reader.
9 10 11 |
# File 'lib/cantango/ability/cache/reader.rb', line 9 def initialize cache @cache = cache end |
Instance Attribute Details
#cache ⇒ Object (readonly)
Returns the value of attribute cache.
7 8 9 |
# File 'lib/cantango/ability/cache/reader.rb', line 7 def cache @cache end |
Instance Method Details
#prepared_rules ⇒ Object
13 14 15 16 |
# File 'lib/cantango/ability/cache/reader.rb', line 13 def prepared_rules debug "reading rules from cache: #{cache.key}" cache.compile_on? ? compiler.decompile!(loaded_rules) : loaded_rules end |