Sha256: 11855f2f23abe898eec3e69c581324a2b958faa724c8fc5393908d32a20d5434

Contents?: true

Size: 528 Bytes

Versions: 14

Compression:

Stored size: 528 Bytes

Contents

module CanTango
  class Ability
    class Cache
      class Reader
        attr_reader :cache

        def initialize cache
          @cache = cache
        end

        def prepared_rules
          cache.compile_on? ? compiler.decompile!(loaded_rules) : loaded_rules
        end

        protected

        def loaded_rules
          rules_cache.load(cache.key)
        end

        def compiler
          cache.compiler
        end

        def rules_cache
          cache.rules_cache
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
cantango-0.9.3.2 lib/cantango/ability/cache/reader.rb
cantango-0.8.9.5 lib/cantango/ability/cache/reader.rb
cantango-0.8.9.4 lib/cantango/ability/cache/reader.rb
cantango-0.8.9.3 lib/cantango/ability/cache/reader.rb
cantango-0.8.9.2 lib/cantango/ability/cache/reader.rb
cantango-0.8.9.1 lib/cantango/ability/cache/reader.rb
cantango-0.8.9 lib/cantango/ability/cache/reader.rb
cantango-0.8.8.1 lib/cantango/ability/cache/reader.rb
cantango-0.8.8 lib/cantango/ability/cache/reader.rb
cantango-0.8.7 lib/cantango/ability/cache/reader.rb
cantango-0.8.6.2 lib/cantango/ability/cache/reader.rb
cantango-0.8.6.1 lib/cantango/ability/cache/reader.rb
cantango-0.8.6 lib/cantango/ability/cache/reader.rb
cantango-0.8.5.1 lib/cantango/ability/cache/reader.rb