ÿØÿà JFIF    ÿÛ „ ( %!1!%*+...983,7(-.- PKD]Hnew-c.rinu[U:RDoc::AnyMethod[iI"new:ETI"IRB::Inspector::new;TT: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"ICreates a new inspector object, using the given +inspect_proc+ when ;TI"!output return values in irb.;T: @fileI"lib/irb/inspector.rb;T:0@omit_headings_from_table_of_contents_below000[I"$(inspect_proc, init_proc = nil);T@FI"Inspector;TcRDoc::NormalClass00PKD]vcdesc-Inspector.rinu[U:RDoc::NormalClass[iI"Inspector:ETI"IRB::Inspector;TI" Object;To:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"An irb inspector;To:RDoc::Markup::BlankLineo; ;[I"KIn order to create your own custom inspector there are two things you ;TI"should be aware of:;T@o; ;[I"SInspector uses #inspect_value, or +inspect_proc+, for output of return values.;T@o; ;[I"NThis also allows for an optional #init+, or +init_proc+, which is called ;TI"%when the inspector is activated.;T@o; ;[I"EKnowing this, you can create a rudimentary inspector as follows:;T@o:RDoc::Markup::Verbatim;[I"Hirb(main):001:0> ins = IRB::Inspector.new(proc{ |v| "omg! #{v}" }) ;TI"iirb(main):001:0> IRB.CurrentContext.inspect_mode = ins # => omg! # ;TI",irb(main):001:0> "what?" #=> omg! what?;T: @format0: @fileI"lib/irb/inspector.rb;T:0@omit_headings_from_table_of_contents_below0; 0;0[[U:RDoc::Constant[iI"INSPECTORS;FI"IRB::Inspector::INSPECTORS;T00o;;[o; ;[I"8Default inspectors available to irb, this includes:;T@o:RDoc::Markup::List: @type: NOTE: @items[o:RDoc::Markup::ListItem: @label[I" +:pp+;T;[o; ;[I" Using Kernel#pretty_inspect;To;;[I" +:yaml+;T;[o; ;[I"Using YAML.dump;To;;[I"+:marshal+;T;[o; ;[I"Using Marshal.dump;T; @%;0@%@cRDoc::NormalClass0[[[I" class;T[[: public[[I"def_inspector;FI"lib/irb/inspector.rb;T[I"keys_with_inspector;F@R[I"new;T@R[:protected[[: private[[I" instance;T[[;[[I" init;F@R[I"inspect_value;F@R[;[[;[[[U:RDoc::Context::Section[i0o;;[; 0;0[@%I"IRB;FcRDoc::NormalModulePKD]bލkeys_with_inspector-c.rinu[U:RDoc::AnyMethod[iI"keys_with_inspector:EFI"(IRB::Inspector::keys_with_inspector;TT: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"QDetermines the inspector to use where +inspector+ is one of the keys passed ;TI"!during inspector definition.;T: @fileI"lib/irb/inspector.rb;T:0@omit_headings_from_table_of_contents_below000[I"(inspector);T@FI"Inspector;TcRDoc::NormalClass00PKD]6ꫴrr init-i.rinu[U:RDoc::AnyMethod[iI" init:EFI"IRB::Inspector#init;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FProc to call when the inspector is activated, good for requiring ;TI"dependent libraries.;T: @fileI"lib/irb/inspector.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Inspector;TcRDoc::NormalClass00PKD]P)ddinspect_value-i.rinu[U:RDoc::AnyMethod[iI"inspect_value:EFI"!IRB::Inspector#inspect_value;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"@Proc to call when the input is evaluated and output in irb.;T: @fileI"lib/irb/inspector.rb;T:0@omit_headings_from_table_of_contents_below000[I"(v);T@FI"Inspector;TcRDoc::NormalClass00PKD].oodef_inspector-c.rinu[U:RDoc::AnyMethod[iI"def_inspector:EFI""IRB::Inspector::def_inspector;TT: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I" Example;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"=Inspector.def_inspector(key, init_p=nil){|v| v.inspect} ;TI"CInspector.def_inspector([key1,..], init_p=nil){|v| v.inspect} ;TI"-Inspector.def_inspector(key, inspector) ;TI"3Inspector.def_inspector([key1,...], inspector);T: @format0: @fileI"lib/irb/inspector.rb;T:0@omit_headings_from_table_of_contents_below000[I"(key, arg=nil, &block);T@FI"Inspector;TcRDoc::NormalClass00PKD]Hnew-c.rinu[PKD]vcdesc-Inspector.rinu[PKD]bލkeys_with_inspector-c.rinu[PKD]6ꫴrr  init-i.rinu[PKD]P)ddp inspect_value-i.rinu[PKD].oodef_inspector-c.rinu[PK