module Zeitwerk::Registry
def inception?(cpath)
- Private: -
def inception?(cpath) if pair = inceptions[cpath] pair.first end end
def loader_for(path)
- Private: -
def loader_for(path) autoloads[path] end
def loader_for_gem(root_file, namespace:, warn_on_extra_files:)
- Private: -
def loader_for_gem(root_file, namespace:, warn_on_extra_files:) gem_loaders_by_root_file[root_file] ||= GemLoader.__new(root_file, namespace: namespace, warn_on_extra_files: warn_on_extra_files) end
def on_unload(loader)
- Private: -
def on_unload(loader) autoloads.delete_if { |_path, object| object == loader } inceptions.delete_if { |_cpath, (_path, object)| object == loader } end
def register_autoload(loader, abspath)
- Private: -
def register_autoload(loader, abspath) autoloads[abspath] = loader end
def register_inception(cpath, abspath, loader)
- Private: -
def register_inception(cpath, abspath, loader) inceptions[cpath] = [abspath, loader] end
def register_loader(loader)
- Private: -
def register_loader(loader) loaders << loader end
def unregister_autoload(abspath)
- Private: -
def unregister_autoload(abspath) autoloads.delete(abspath) end
def unregister_loader(loader)
- Private: -
def unregister_loader(loader) loaders.delete(loader) gem_loaders_by_root_file.delete_if { |_, l| l == loader } autoloads.delete_if { |_, l| l == loader } inceptions.delete_if { |_, (_, l)| l == loader } end