Class: Dry::System::Plugins::Zeitwerk Private
- Inherits:
-
Module
- Object
- Module
- Dry::System::Plugins::Zeitwerk
- Defined in:
- lib/dry/system/plugins/zeitwerk.rb,
lib/dry/system/plugins/zeitwerk/compat_inflector.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Defined Under Namespace
Classes: CompatInflector
Instance Attribute Summary collapse
- #debug ⇒ Object readonly private
- #eager_load ⇒ Object readonly private
- #loader ⇒ Object readonly private
- #run_setup ⇒ Object readonly private
Class Method Summary collapse
- .dependencies ⇒ Object private
Instance Method Summary collapse
- #extended(system) ⇒ Object private
-
#initialize(loader: nil, run_setup: true, eager_load: nil, debug: false) ⇒ Zeitwerk
constructor
private
A new instance of Zeitwerk.
Constructor Details
#initialize(loader: nil, run_setup: true, eager_load: nil, debug: false) ⇒ Zeitwerk
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Zeitwerk.
23 24 25 26 27 28 29 |
# File 'lib/dry/system/plugins/zeitwerk.rb', line 23 def initialize(loader: nil, run_setup: true, eager_load: nil, debug: false) @loader = loader || ::Zeitwerk::Loader.new @run_setup = run_setup @eager_load = eager_load @debug = debug super() end |
Instance Attribute Details
#debug ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
20 21 22 |
# File 'lib/dry/system/plugins/zeitwerk.rb', line 20 def debug @debug end |
#eager_load ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
20 21 22 |
# File 'lib/dry/system/plugins/zeitwerk.rb', line 20 def eager_load @eager_load end |
#loader ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
20 21 22 |
# File 'lib/dry/system/plugins/zeitwerk.rb', line 20 def loader @loader end |
#run_setup ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
20 21 22 |
# File 'lib/dry/system/plugins/zeitwerk.rb', line 20 def run_setup @run_setup end |
Class Method Details
.dependencies ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
11 12 13 14 15 16 17 |
# File 'lib/dry/system/plugins/zeitwerk.rb', line 11 def self.dependencies [ "dry/system/loader/autoloading", "dry/system/plugins/zeitwerk/compat_inflector", {"zeitwerk" => "zeitwerk"} ] end |
Instance Method Details
#extended(system) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/dry/system/plugins/zeitwerk.rb', line 32 def extended(system) system.setting :autoloader, reader: true system.config.autoloader = loader system.config.component_dirs.loader = Dry::System::Loader::Autoloading system.config.component_dirs.add_to_load_path = false system.after(:configure, &method(:setup_autoloader)) super end |