module Dry::System::Plugins::DependencyGraph
@api public
Public Class Methods
dependencies()
click to toggle source
@api private
# File lib/dry/system/plugins/dependency_graph.rb, line 30 def self.dependencies {'dry-events': "dry/events/publisher"} end
extended(system)
click to toggle source
@api private
Calls superclass method
# File lib/dry/system/plugins/dependency_graph.rb, line 12 def self.extended(system) super system.use(:notifications) system.before(:configure) do setting :ignored_dependencies, default: [] end system.after(:configure) do self[:notifications].register_event(:resolved_dependency) self[:notifications].register_event(:registered_dependency) strategies(Strategies) end end
Public Instance Methods
register(key, contents = nil, options = {}, &block)
click to toggle source
@api private
Calls superclass method
# File lib/dry/system/plugins/dependency_graph.rb, line 35 def register(key, contents = nil, options = {}, &block) super dependency_key = key.to_s unless config.ignored_dependencies.include?(dependency_key) self[:notifications].instrument( :registered_dependency, key: dependency_key, class: self[dependency_key].class ) end self end