Module: Dry::System

Defined in:
lib/dry/system.rb,
lib/dry/system/stubs.rb,
lib/dry/system/booter.rb,
lib/dry/system/errors.rb,
lib/dry/system/loader.rb,
lib/dry/system/version.rb,
lib/dry/system/importer.rb,
lib/dry/system/component.rb,
lib/dry/system/constants.rb,
lib/dry/system/container.rb,
lib/dry/system/lifecycle.rb,
lib/dry/system/auto_registrar.rb,
lib/dry/system/manual_registrar.rb,
lib/dry/system/magic_comments_parser.rb,
lib/dry/system/auto_registrar/configuration.rb

Defined Under Namespace

Classes: AutoRegistrar, Booter, Component, Container, Importer, Lifecycle, Loader, MagicCommentsParser, ManualRegistrar

Constant Summary collapse

FileNotFoundError =

Error raised when the container tries to load a component with missing file

Class.new(StandardError) do
  def initialize(component)
    super("could not resolve require file for #{component.identifier}")
  end
end
ComponentFileMismatchError =

Error raised when booter file do not match with register component

Class.new(StandardError) do
  def initialize(filename, registered_booted_keys)
    super("Mismatch between filename +#{filename}+ and registered components +#{registered_booted_keys}+")
  end
end
ComponentLoadError =

Error raised when a resolved component couldn't be found

Class.new(StandardError) do
  def initialize(component)
    super("could not load component #{component.inspect}")
  end
end
InvalidComponentError =

Error raised when resolved component couldn't be loaded

Class.new(ArgumentError) do
  def initialize(name, reason = nil)
    super(
      "Tried to create an invalid #{name.inspect} component - #{reason}"
    )
  end
end
InvalidComponentIdentifierError =

Error raised when component's identifier is not valid

Class.new(ArgumentError) do
  def initialize(name)
    super(
      "component identifier +#{name}+ is invalid or boot file is missing"
    )
  end
end
InvalidComponentIdentifierTypeError =

Error raised when component's identifier for booting is not a symbol

Class.new(ArgumentError) do
  def initialize(name)
    super("component identifier #{name.inspect} must be a symbol")
  end
end
VERSION =
'0.7.2'.freeze
RB_EXT =
'.rb'.freeze
RB_GLOB =
'*.rb'.freeze
EMPTY_STRING =
''.freeze
PATH_SEPARATOR =
'/'.freeze
DEFAULT_SEPARATOR =
'.'.freeze
WORD_REGEX =
/\w+/.freeze