| Server IP : 162.214.74.102 / Your IP : 216.73.217.21 Web Server : Apache System : Linux dedi-4363141.lrsys.com.br 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64 User : lrsys ( 1015) PHP Version : 5.6.40 Disable Function : exec,passthru,shell_exec,system MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/self/root/opt/cpanel/ea-ruby24/root/usr/share/ri/system/Class/ |
Upload File : |
U:RDoc::AnyMethod[iI"new:ETI"Class::new;TT:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"GCreates a new anonymous (unnamed) class with the given superclass ;TI"G(or <code>Object</code> if no parameter is given). You can give a ;TI">class a name by assigning the class object to a constant.;To:RDoc::Markup::BlankLine o;
; [I"GIf a block is given, it is passed the class object, and the block ;TI"4is evaluated in the context of this class like ;TI"<code>class_eval</code>.;T@o:RDoc::Markup::Verbatim; [I"fred = Class.new do
;TI" def meth1
;TI" "hello"
;TI" end
;TI" def meth2
;TI" "bye"
;TI" end
;TI" end
;TI"
;TI">a = fred.new #=> #<#<Class:0x100381890>:0x100376b98>
;TI""a.meth1 #=> "hello"
;TI" a.meth2 #=> "bye"
;T:@format0o;
; [I"EAssign the class to a constant (name starting uppercase) if you ;TI"+want to treat it like a regular class.;T:
@fileI"
object.c;T:0@omit_headings_from_table_of_contents_below0I"sClass.new(super_class=Object) -> a_class
Class.new(super_class=Object) { |mod| ... } -> a_class
;T0[ I"(p1 = v1);T@(FI"
Class;TcRDoc::NormalClass00