Files
news.gitea.happylizard.me/bin/gems/zeitwerk-2.7.2/lib/zeitwerk/real_mod_name.rb
T
pizza2d1 4cee170d66
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s
Add bin and edit workflow
2026-09-16 13:11:16 -06:00

17 lines
485 B
Ruby

# frozen_string_literal: true
module Zeitwerk::RealModName
UNBOUND_METHOD_MODULE_NAME = Module.instance_method(:name)
private_constant :UNBOUND_METHOD_MODULE_NAME
# Returns the real name of the class or module, as set after the first
# constant to which it was assigned (or nil).
#
# The name method can be overridden, hence the indirection in this method.
#
# @sig (Module) -> String?
def real_mod_name(mod)
UNBOUND_METHOD_MODULE_NAME.bind_call(mod)
end
end