Method: Moneta::Cache#initialize

Defined in:
lib/moneta/cache.rb

#initialize(options = {}) {|Builder| ... } ⇒ Cache

Returns a new instance of Cache.

Parameters:

  • options (Hash) (defaults to: {})

    Options hash

Options Hash (options):

  • :cache (Moneta store)

    Moneta store used as cache

  • :adapter (Moneta store)

    Moneta store used as adapter

Yield Parameters:

  • Builder

    block



44
45
46
47
# File 'lib/moneta/cache.rb', line 44

def initialize(options = {}, &block)
  @cache, @adapter = options[:cache], options[:adapter]
  DSL.new(self, &block) if block_given?
end