📁 File Manager Pro
v10.0.3 | PHP: 8.1.34
Server: Apache
2026-06-22 05:47:16
📂
/ (Root)
/
opt
/
alt
/
ruby33
/
share
/
ri
/
system
/
Module
📍 /opt/alt/ruby33/share/ri/system/Module
🔄 Refresh
✏️
Editing: set_temporary_name-i.ri
Read Only
U:RDoc::AnyMethod[iI"set_temporary_name:ETI"Module#set_temporary_name;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"FSets the temporary name of the module. This name is reflected in ;FI"Mintrospection of the module and the values that are related to it, such ;FI"*as instances, constants, and methods.;Fo:RDoc::Markup::BlankLine o; ; [I"OThe name should be +nil+ or non-empty string that is not a valid constant ;FI"Ename (to avoid confusing between permanent and temporary names).;F@o; ; [I"OThe method can be useful to distinguish dynamically generated classes and ;FI"1modules without assigning them to constants.;F@o; ; [I"LIf the module is given a permanent name by assigning it to a constant, ;FI"Lthe temporary name is discarded. A temporary name can't be assigned to ;FI"(modules that have a permanent name.;F@o; ; [I"DIf the given name is +nil+, the module becomes anonymous again.;F@o; ; [I" Example:;F@o:RDoc::Markup::Verbatim; [I"6m = Module.new # => #<Module:0x0000000102c68f38> ;TI"m.name #=> nil ;TI" ;TI"6m.set_temporary_name("fake_name") # => fake_name ;TI"m.name #=> "fake_name" ;TI" ;TI"Am.set_temporary_name(nil) # => #<Module:0x0000000102c68f38> ;TI"m.name #=> nil ;TI" ;TI"c = Class.new ;TI"7c.set_temporary_name("MyClass(with description)") ;TI" ;TI"5c.new # => #<MyClass(with description):0x0....> ;TI" ;TI"c::M = m ;TI"2c::M.name #=> "MyClass(with description)::M" ;TI" ;TI"F# Assigning to a constant replaces the name with a permanent one ;TI"C = c ;TI" ;TI"C.name #=> "C" ;TI"C::M.name #=> "C::M" ;TI"c.new # => #<C:0x0....>;T:@format0: @fileI" object.c;T:0@omit_headings_from_table_of_contents_below0I"Pmod.set_temporary_name(string) -> self mod.set_temporary_name(nil) -> self ;F0[ I" (p1);T@=FI"Module;TcRDoc::NormalClass00
💾 Save Changes
❌ Cancel