Class: Dry::Effects::System::AutoRegistrar
- Inherits:
-
System::AutoRegistrar
- Object
- System::AutoRegistrar
- Dry::Effects::System::AutoRegistrar
- Defined in:
- lib/dry/effects/extensions/system.rb
Instance Method Summary collapse
-
#call(component_dir) ⇒ Object
Always memoize and freeze registered components.
Instance Method Details
#call(component_dir) ⇒ Object
Always memoize and freeze registered components
12 13 14 15 16 17 18 |
# File 'lib/dry/effects/extensions/system.rb', line 12 def call(component_dir) component_dir.each_component do |component| next unless register_component?(component) container.register(component.key, memoize: true) { component.instance.freeze } end end |