Sha256: b818521b573fe1edc677146c3f2b410698ab5b301e17c5b2ab3e1dc5658dfd06
Contents?: true
Size: 482 Bytes
Versions: 12
Compression:
Stored size: 482 Bytes
Contents
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. # # @param mod [Class, Module] # @return [String, nil] def real_mod_name(mod) UNBOUND_METHOD_MODULE_NAME.bind(mod).call end end
Version data entries
12 entries across 9 versions & 3 rubygems