Class: CanTango::Ability::Cache::Reader
- Inherits:
-
Object
- Object
- CanTango::Ability::Cache::Reader
- 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
Constructor Details
#initialize(cache) ⇒ Reader
Returns a new instance of Reader.
7 8 9 |
# File 'lib/cantango/ability/cache/reader.rb', line 7 def initialize cache @cache = cache end |
Instance Attribute Details
#cache ⇒ Object (readonly)
Returns the value of attribute cache.
5 6 7 |
# File 'lib/cantango/ability/cache/reader.rb', line 5 def cache @cache end |
Instance Method Details
#prepared_rules ⇒ Object
11 12 13 |
# File 'lib/cantango/ability/cache/reader.rb', line 11 def prepared_rules cache.compile_on? ? compiler.decompile!(loaded_rules) : loaded_rules end |