Class: Staticky::Pluggable::Resolver
- Inherits:
-
Dry::Container::Resolver
- Object
- Dry::Container::Resolver
- Staticky::Pluggable::Resolver
- Defined in:
- lib/staticky/pluggable.rb
Instance Method Summary collapse
- #call(container, key) ⇒ Object
-
#initialize(klass) ⇒ Resolver
constructor
A new instance of Resolver.
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 |