ÿØÿà JFIF    ÿÛ „ ( %!1!%*+...983,7(-.- U:RDoc::NormalClass[iI"BasicObject:ET@0o:RDoc::Markup::Document: @parts[o;;[: @fileI" class.c;T:0@omit_headings_from_table_of_contents_below0o;;[o:RDoc::Markup::Paragraph;[I"OBasicObject is the parent class of all classes in Ruby. It's an explicit ;TI"blank class.;To:RDoc::Markup::BlankLineo; ;[ I"LBasicObject can be used for creating object hierarchies independent of ;TI"ORuby's object hierarchy, proxy objects like the Delegator class, or other ;TI"Luses where namespace pollution from Ruby's methods and classes must be ;TI" avoided.;T@o; ;[I"KTo avoid polluting BasicObject for other users an appropriately named ;TI"Msubclass of BasicObject should be created instead of directly modifying ;TI"BasicObject:;T@o:RDoc::Markup::Verbatim;[I"(class MyObjectSystem < BasicObject ;TI" end ;T: @format0o; ;[I"GBasicObject does not include Kernel (for methods like +puts+) and ;TI"OBasicObject is outside of the namespace of the standard library so common ;TI"?classes will not be found without using a full class path.;T@o; ;[ I"KA variety of strategies can be used to provide useful portions of the ;TI"Fstandard library to subclasses of BasicObject. A subclass could ;TI"Jinclude Kernel to obtain +puts+, +exit+, etc. A custom ;TI"PKernel-like module could be created and included or delegation can be used ;TI"via #method_missing:;T@o; ;[I"(class MyObjectSystem < BasicObject ;TI" DELEGATE = [:puts, :p] ;TI" ;TI"/ def method_missing(name, *args, &block) ;TI"4 return super unless DELEGATE.include? name ;TI", ::Kernel.send(name, *args, &block) ;TI" end ;TI" ;TI"> def respond_to_missing?(name, include_private = false) ;TI"* DELEGATE.include?(name) or super ;TI" end ;TI" end ;T;0o; ;[ I"IAccess to classes and modules from the Ruby standard library can be ;TI"Lobtained in a BasicObject subclass by referencing the desired constant ;TI"Jfrom the root like ::File or ::Enumerator. ;TI"KLike #method_missing, #const_missing can be used to delegate constant ;TI"lookup to +Object+:;T@o; ;[ I"(class MyObjectSystem < BasicObject ;TI"$ def self.const_missing(name) ;TI"" ::Object.const_get(name) ;TI" end ;TI" end ;T;0S:RDoc::Markup::Heading: leveli: textI"What's Here;T@o; ;[I"4These are the methods defined for \BasicObject:;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o;;: NOTE;[o;;[I" ::new;T;[o; ;[I")Returns a new \BasicObject instance.;To;;0;[o;;;;[o;;[I"{!}[#method-i-21];T;[o; ;[I"?Returns the boolean negation of +self+: +true+ or +false+.;To;;0;[o;;;;[o;;[I"{!=}[#method-i-21-3D];T;[o; ;[I"1Returns whether +self+ and the given object ;TI"are _not_ equal.;To;;0;[o;;;;[o;;[I"{==}[#method-i-3D-3D];T;[o; ;[I"1Returns whether +self+ and the given object ;TI"are equivalent.;To;;0;[o;;;;[o;;[I"{__id__}[#method-i-__id__];T;[o; ;[I"6Returns the integer object identifier for +self+.;To;;0;[o;;;;[o;;[I"#{__send__}[#method-i-__send__];T;[o; ;[I"5Calls the method identified by the given symbol.;To;;0;[o;;;;[o;;[I" #equal?;T;[o; ;[I"EReturns whether +self+ and the given object are the same object.;To;;0;[o;;;;[o;;[I"#instance_eval;T;[o; ;[I"BEvaluates the given string or block in the context of +self+.;To;;0;[o;;;;[o;;[I"#instance_exec;T;[o; ;[I"8Executes the given block in the context of +self+, ;TI"!passing the given arguments.;To;;0;[o;;;;[o;;[I"#method_missing;T;[o; ;[I"@Method called when an undefined method is called on +self+.;To;;0;[o;;;;[o;;[I"#singleton_method_added;T;[o; ;[I"+Method called when a singleton method ;TI"is added to +self+.;To;;0;[o;;;;[o;;[I"#singleton_method_removed;T;[o; ;[I"+Method called when a singleton method ;TI""is added removed from +self+.;To;;0;[o;;;;[o;;[I" #singleton_method_undefined;T;[o; ;[I"+Method called when a singleton method ;TI"is undefined in +self+.;T; I" object.c;T; 0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I"new;TI" object.c;T[I" instance;T[[;[[;[[;[[I"!;T@ò[I"!=;T@ò[I"==;T@ò[I" __id__;TI" gc.c;T[I" __send__;TI"vm_eval.c;T[I" equal?;T@ò[I"instance_eval;T@[I"instance_exec;T@[I"method_missing;T@[I"singleton_method_added;T@ò[I"singleton_method_removed;T@ò[I"singleton_method_undefined;T@ò[[U:RDoc::Context::Section[i0o;;[; 0; 0[ I" class.c;TI" gc.c;TI" object.c;TI"vm_eval.c;T@âcRDoc::TopLevel