dry-rb/dry-system

View on GitHub
examples/custom_configuration_auto_register/system/container.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

require "dry/system/container"

class App < Dry::System::Container
  configure do |config|
    config.component_dirs.add "lib" do |dir|
      dir.memoize = true

      dir.auto_register = lambda do |component|
        !component.identifier.start_with?("entities")
      end
    end
  end
end