lib/dry/system/manual_registrar.rb in dry-system-0.20.0 vs lib/dry/system/manual_registrar.rb in dry-system-0.21.0

- old
+ new

@@ -28,19 +28,15 @@ call(File.basename(file, RB_EXT)) end end # @api private - def call(name) - name = name.respond_to?(:root_key) ? name.root_key.to_s : name - - require(root.join(config.registrations_dir, name)) + def call(component) + require(root.join(config.registrations_dir, component.root_key.to_s)) end - def file_exists?(name) - name = name.respond_to?(:root_key) ? name.root_key.to_s : name - - File.exist?(File.join(registrations_dir, "#{name}#{RB_EXT}")) + def file_exists?(component) + File.exist?(File.join(registrations_dir, "#{component.root_key}#{RB_EXT}")) end private # @api private