class Librarian::Environment::RuntimeCache::KeyspaceCache

Attributes

keyspace[RW]
runtime_cache[RW]

Public Class Methods

new(runtime_cache, keyspace) click to toggle source
# File lib/librarian/environment/runtime_cache.rb, line 24
def initialize(runtime_cache, keyspace)
  self.runtime_cache = runtime_cache
  self.keyspace = keyspace
end

Private Class Methods

delegate_to_backing_cache(*methods) click to toggle source
# File lib/librarian/environment/runtime_cache.rb, line 12
def delegate_to_backing_cache(*methods)
  methods.each do |method|
    define_method "#{method}" do |*args, &block|
      # TODO: When we drop ruby-1.8.7 support, use #public_send.
      runtime_cache.send(method, keyspace, *args, &block)
    end
  end
end