Module: Zeitwerk::Loader::Callbacks
- Extended by:
- Internal
- Includes:
- RealModName
- Included in:
- Zeitwerk::Loader
- Defined in:
- lib/zeitwerk/loader/callbacks.rb
Instance Method Summary collapse
-
#on_namespace_loaded(namespace) ⇒ Object
Invoked when a class or module is created or reopened, either from the const_added or from module autovivification.
Methods included from Internal
Methods included from RealModName
Instance Method Details
#on_namespace_loaded(namespace) ⇒ Object
Invoked when a class or module is created or reopened, either from the const_added or from module autovivification. If the namespace has matching subdirectories, we descend into them now.
81 82 83 84 85 86 87 |
# File 'lib/zeitwerk/loader/callbacks.rb', line 81 def on_namespace_loaded(namespace) if dirs = namespace_dirs.delete(real_mod_name(namespace)) dirs.each do |dir| define_autoloads_for_dir(dir, namespace) end end end |