lib/dry/system/container.rb in dry-system-1.0.1 vs lib/dry/system/container.rb in dry-system-1.1.0.beta1
- old
+ new
@@ -146,11 +146,11 @@
# Registers another container for import
#
# @example
# # system/container.rb
- # require "dry/system/container"
+ # require "dry/system"
# require "logger"
#
# class Core < Dry::System::Container
# register("logger", Logger.new($stdout))
# end
@@ -606,17 +606,17 @@
# rubocop:disable Metrics/AbcSize, Metrics/PerceivedComplexity
# @api private
def load_component(key)
return self if registered?(key)
- if (provider = providers.find_and_load_provider(key))
+ if (provider = providers[key])
provider.start
return self
end
component = find_component(key)
- providers.start_provider_dependency(component)
+ providers[component.root_key]&.start
return self if registered?(key)
if component.loadable?
load_local_component(component)
elsif manifest_registrar.file_exists?(component)