Module: Zeitwerk::ExplicitNamespace

Extended by:
Internal, RealModName
Defined in:
lib/zeitwerk/explicit_namespace.rb

Overview

Centralizes the logic for the trace point used to detect the creation of explicit namespaces, needed to descend into matching subdirectories right after the constant has been defined.

The implementation assumes an explicit namespace is managed by one loader. Loaders that reopen namespaces owned by other projects are responsible for loading their constant before setup. This is documented.

Class Attribute Summary collapse

Method Summary

Methods included from RealModName

real_mod_name

Methods included from Internal

internal

Class Attribute Details

.cpathsObject (readonly)

Maps constant paths that correspond to explicit namespaces according to the file system, to the loader responsible for them.



20
21
22
# File 'lib/zeitwerk/explicit_namespace.rb', line 20

def cpaths
  @cpaths
end

.mutexObject (readonly)

Returns the value of attribute mutex.



24
25
26
# File 'lib/zeitwerk/explicit_namespace.rb', line 24

def mutex
  @mutex
end

.tracerObject (readonly)

Returns the value of attribute tracer.



28
29
30
# File 'lib/zeitwerk/explicit_namespace.rb', line 28

def tracer
  @tracer
end