Class: Dry::Effects::System::Container

Inherits:
System::Container
  • Object
show all
Defined in:
lib/dry/effects/extensions/system.rb

Class Method Summary collapse

Class Method Details

.finalize!Object



32
33
34
35
36
37
38
39
40
# File 'lib/dry/effects/extensions/system.rb', line 32

def self.finalize!
  return self if finalized?

  super

  # Force all components to load
  each_key { resolve(_1) }
  self
end

.injector(effects: true, **kwargs) ⇒ Object



24
25
26
27
28
29
30
# File 'lib/dry/effects/extensions/system.rb', line 24

def self.injector(effects: true, **kwargs)
  if effects
    Dry::Effects.AutoInject(**kwargs)
  else
    super()
  end
end