Module: Zeitwerk::RealModName

Included in:
Cref, GemLoader, Loader, Loader, Loader::Config
Defined in:
lib/zeitwerk/real_mod_name.rb

Instance Method Summary collapse

Instance Method Details

#real_mod_name(mod) ⇒ Object

Returns the real name of the class or module.

We need this indirection becasue the ‘name` method can be overridden, and because in practice what we really need is the constant paths of modules with a permanent name, not so much what the user considers to be the name of a certain class or module of theirs.

: (Module) -> String?



16
17
18
# File 'lib/zeitwerk/real_mod_name.rb', line 16

def real_mod_name(mod)
  UNBOUND_METHOD_MODULE_NAME.bind_call(mod)
end