Class: Staticky::Pluggable::Resolver

Inherits:
Dry::Container::Resolver
  • Object
show all
Defined in:
lib/staticky/pluggable.rb

Instance Method Summary collapse

Constructor Details

#initialize(klass) ⇒ Resolver

Returns a new instance of Resolver.



6
7
8
# File 'lib/staticky/pluggable.rb', line 6

def initialize(klass)
  @klass = klass
end

Instance Method Details

#call(container, key) ⇒ Object



10
11
12
# File 'lib/staticky/pluggable.rb', line 10

def call(container, key)
  container.fetch(key.to_s).call
end