Sha256: 9c43530e3056152106a87264fdfe9af6db45603faa90f434021b2b7186699c57

Contents?: true

Size: 607 Bytes

Versions: 12

Compression:

Stored size: 607 Bytes

Contents

# frozen_string_literal: true

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

12 entries across 12 versions & 1 rubygems

Version Path
dry-system-1.2.1 lib/dry/system/loader/autoloading.rb
dry-system-1.2.0 lib/dry/system/loader/autoloading.rb
dry-system-1.1.1 lib/dry/system/loader/autoloading.rb
dry-system-1.1.0 lib/dry/system/loader/autoloading.rb
dry-system-1.1.0.beta2 lib/dry/system/loader/autoloading.rb
dry-system-1.1.0.beta1 lib/dry/system/loader/autoloading.rb
dry-system-1.0.1 lib/dry/system/loader/autoloading.rb
dry-system-1.0.0 lib/dry/system/loader/autoloading.rb
dry-system-1.0.0.rc1 lib/dry/system/loader/autoloading.rb
dry-system-0.27.2 lib/dry/system/loader/autoloading.rb
dry-system-0.27.1 lib/dry/system/loader/autoloading.rb
dry-system-0.27.0 lib/dry/system/loader/autoloading.rb