Method: Moneta::WeakEachKey#initialize

Defined in:
lib/moneta/weak_each_key.rb

#initialize(adapter, options = {}) ⇒ WeakEachKey

Returns a new instance of WeakEachKey.

Parameters:

  • adapter (Moneta store)

    The underlying store

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


19
20
21
22
23
# File 'lib/moneta/weak_each_key.rb', line 19

def initialize(adapter, options = {})
  raise 'Store already supports feature :each_key' if adapter.supports?(:each_key)
  @all_keys = Set.new
  super
end