Module: Dry::AutoInject

Defined in:
lib/dry/auto_inject.rb,
lib/dry/auto_inject/builder.rb,
lib/dry/auto_inject/version.rb,
lib/dry/auto_inject/injector.rb,
lib/dry/auto_inject/strategies.rb,
lib/dry/auto_inject/dependency_map.rb,
lib/dry/auto_inject/strategies/args.rb,
lib/dry/auto_inject/strategies/hash.rb,
lib/dry/auto_inject/method_parameters.rb,
lib/dry/auto_inject/strategies/kwargs.rb,
lib/dry/auto_inject/strategies/constructor.rb

Defined Under Namespace

Classes: Builder, DependencyMap, Injector, MethodParameters, Strategies

Constant Summary collapse

VERSION =
"1.0.1"
DuplicateDependencyError =
Class.new(StandardError)
DependencyNameInvalid =
Class.new(StandardError)
VALID_NAME =
/([a-z_][a-zA-Z_0-9]*)$/.freeze

Class Method Summary collapse

Class Method Details

.loaderObject



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/dry/auto_inject.rb', line 8

def self.loader
  @loader ||= Zeitwerk::Loader.new.tap do |loader|
    root = File.expand_path("..", __dir__)
    loader.tag = "dry-auto_inject"
    loader.inflector = Zeitwerk::GemInflector.new("#{root}/dry-auto_inject.rb")
    loader.push_dir(root)
    loader.ignore(
      "#{root}/dry-auto_inject.rb",
      "#{root}/dry/auto_inject/version.rb"
    )
  end
end