class Zeitwerk::Registry::Inceptions

:nodoc:
registry is for.
to know if a given cpath is an inception globally. This is what this
Loaders know their own inceptions, but there is a use case in which we need

def clear # for tests

for tests
: () -> void
def clear # for tests
  @inceptions.clear
end

def initialize

: () -> void
:nodoc:
registry is for.
to know if a given cpath is an inception globally. This is what this
Loaders know their own inceptions, but there is a use case in which we need
def initialize
  @inceptions = Zeitwerk::Cref::Map.new #: Zeitwerk::Cref::Map[String]
end

def register(cref, abspath)

: (Zeitwerk::Cref, String) -> void
def register(cref, abspath)
  @inceptions[cref] = abspath
end

def registered?(cref)

: (Zeitwerk::Cref) -> String?
def registered?(cref)
  @inceptions[cref]
end

def unregister(cref)

: (Zeitwerk::Cref) -> void
def unregister(cref)
  @inceptions.delete(cref)
end