Sha256: f4b4e29ba21890902d19380503436e78f96fbbc6bbae4e17e779e2d152868321

Contents?: true

Size: 637 Bytes

Versions: 10

Compression:

Stored size: 637 Bytes

Contents

# frozen_string_literal: true

require_relative "../loader"

module Dry
  module System
    class Loader
      # Component loader for autoloading-enabled applications
      #
      # This behaves like the default loader, except instead of requiring the given path,
      # it loads the respective constant, allowing the autoloader to load the
      # corresponding file per its own configuration.
      #
      # @see Loader
      # @api public
      class Autoloading < Loader
        class << self
          def require!(component)
            constant(component)
            self
          end
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
dry-system-0.26.0 lib/dry/system/loader/autoloading.rb
dry-system-0.25.0 lib/dry/system/loader/autoloading.rb
dry-system-0.24.0 lib/dry/system/loader/autoloading.rb
dry-system-0.23.0 lib/dry/system/loader/autoloading.rb
dry-system-0.22.0 lib/dry/system/loader/autoloading.rb
dry-system-0.21.0 lib/dry/system/loader/autoloading.rb
dry-system-0.20.0 lib/dry/system/loader/autoloading.rb
dry-system-0.19.2 lib/dry/system/loader/autoloading.rb
dry-system-0.19.1 lib/dry/system/loader/autoloading.rb
dry-system-0.19.0 lib/dry/system/loader/autoloading.rb