Sha256: 09bfb32954a0a9ac81934319712b3ba7d27e8d2959367c72296f126060d0e47b

Contents?: true

Size: 338 Bytes

Versions: 4

Compression:

Stored size: 338 Bytes

Contents

module CacheKeeper
  class Store < Array
    def find_by(klass, method_name)
      find do |cached_method|
        cached_method.klass == klass && cached_method.method_name == method_name
      end
    end

    def autorefreshed
      select do |cached_method|
        cached_method.autorefresh_block.present?
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cache_keeper-0.6.1 lib/cache_keeper/store.rb
cache_keeper-0.6.0 lib/cache_keeper/store.rb
cache_keeper-0.5.1 lib/cache_keeper/store.rb
cache_keeper-0.5.0 lib/cache_keeper/store.rb