Class: Dry::Container::Item::Factory
- Inherits:
-
Object
- Object
- Dry::Container::Item::Factory
- Defined in:
- lib/dry/container/item/factory.rb
Overview
Factory for create an Item to register inside of container
Instance Method Summary collapse
-
#call(item, options = {}) ⇒ Dry::Container::Item::Base
Creates an Item Memoizable or Callable.
Instance Method Details
#call(item, options = {}) ⇒ Dry::Container::Item::Base
Creates an Item Memoizable or Callable
20 21 22 |
# File 'lib/dry/container/item/factory.rb', line 20 def call(item, = {}) [:memoize] ? Memoizable.new(item, ) : Callable.new(item, ) end |