Method: AsyncStorage::Repo#initialize

Defined in:
lib/async_storage/repo.rb

#initialize(resolver_class, **options) ⇒ Repo

Returns a new instance of Repo.

Parameters:

  • resolver_class (Class)

    A class with the call method

  • options (Hash)

    A hash with config

  • expires_in (Hash)

    a customizable set of options

Raises:

  • (ArgumentError)

    When the resolver_class does not respond with ‘call’ instance method



13
14
15
16
17
# File 'lib/async_storage/repo.rb', line 13

def initialize(resolver_class, **options)
  validate_resolver_class!(resolver_class)
  @resolver_class = resolver_class
  @options = options
end