module Zeitwerk::Loader::Config
def dirs(namespaces: false, ignored: false)
These are read-only collections, please add to them with `push_dir`.
If `ignored` is falsey (default), ignored root directories are filtered out.
values are their corresponding namespaces, class or module objects.
instead. Keys are the absolute paths of the root directories as strings,
paths of the root directories as strings. If truthy, returns a hash table
If `namespaces` is falsey (default), returns an array with the absolute
def dirs(namespaces: false, ignored: false) if namespaces if ignored || ignored_paths.empty? roots.clone else roots.reject { |root_dir, _namespace| ignored_path?(root_dir) } end else if ignored || ignored_paths.empty? roots.keys else roots.keys.reject { |root_dir| ignored_path?(root_dir) } end end.freeze end