lib/dry/system/auto_registrar.rb in dry-system-0.19.0 vs lib/dry/system/auto_registrar.rb in dry-system-0.19.1

- old
+ new

@@ -30,11 +30,11 @@ # @api private def call(component_dir) components(component_dir).each do |component| next unless register_component?(component) - container.register(component.identifier, memoize: component.memoize?) { component.instance } + container.register(component.key, memoize: component.memoize?) { component.instance } end end private @@ -49,10 +49,10 @@ Dir["#{dir}/**/#{RB_GLOB}"].sort end def register_component?(component) - !container.registered?(component) && component.auto_register? + !container.registered?(component.key) && component.auto_register? end end end end