File: C:/Ruby27-x64/share/ri/2.7.0/system/Class/cdesc-Class.ri
U:RDoc::NormalClass[iI"
Class:ET@I"Module;To:RDoc::Markup::Document:@parts[o;;[o:RDoc::Markup::Paragraph;[I";Extends any Class to include _json_creatable?_ method.;T:
@fileI" ext/json/lib/json/common.rb;T:0@omit_headings_from_table_of_contents_below0o;;[o; ;[I"FClasses in Ruby are first-class objects---each is an instance of ;TI"class Class.;To:RDoc::Markup::BlankLine o; ;[I"0Typically, you create a new class by using:;T@o:RDoc::Markup::Verbatim;[I"class Name
;TI"0 # some code describing the class behavior
;TI" end
;T:@format0o; ;[I"MWhen a new class is created, an object of type Class is initialized and ;TI"7assigned to a global constant (Name in this case).;T@o; ;[I"FWhen <code>Name.new</code> is called to create a new object, the ;TI"-#new method in Class is run by default. ;TI":This can be demonstrated by overriding #new in Class:;T@o;
;[I"class Class
;TI" alias old_new new
;TI" def new(*args)
;TI"2 print "Creating a new ", self.name, "\n"
;TI" old_new(*args)
;TI" end
;TI" end
;TI"
;TI"class Name
;TI" end
;TI"
;TI"n = Name.new
;T;0o; ;[I"<em>produces:</em>;T@o;
;[I"Creating a new Name
;T;0o; ;[ I"DClasses, modules, and objects are interrelated. In the diagram ;TI"Fthat follows, the vertical arrows represent inheritance, and the ;TI"<parentheses metaclasses. All metaclasses are instances ;TI"of the class `Class'.;To;
;[I"< +---------+ +-...
;TI"8 | | |
;TI"< BasicObject-----|-->(BasicObject)-------|-...
;TI"8 ^ | ^ |
;TI"8 | | | |
;TI"< Object---------|----->(Object)---------|-...
;TI"8 ^ | ^ |
;TI"8 | | | |
;TI"8 +-------+ | +--------+ |
;TI"8 | | | | | |
;TI"< | Module-|---------|--->(Module)-|-...
;TI"8 | ^ | | ^ |
;TI"8 | | | | | |
;TI"< | Class-|---------|---->(Class)-|-...
;TI"8 | ^ | | ^ |
;TI"8 | +---+ | +----+
;TI"* | |
;TI";obj--->OtherClass---------->(OtherClass)-----------...;T;0;
I"
object.c;T;0;
0;0[ [ [ [[I"
class;T[[:public[[I"new;TI"../ruby-2.7.7/object.c;T[:protected[ [:private[ [I"
instance;T[[;[ [I"
allocate;T@c[I"json_creatable?;TI".../ruby-2.7.7/ext/json/lib/json/common.rb;T[I"new;T@c[I"superclass;T@c[;[ [;[[I"inherited;T@c[ [U:RDoc::Context::Section[i 0o;;[ ;
0;0[I" ext/json/lib/json/common.rb;TI"
object.c;T@WcRDoc::TopLevel