Gestionnaire de fichiers - Editer - /opt/cpanel/ea-ruby24/root/usr/share/ri/system/IRB/Inspector/cdesc-Inspector.ri
Arrière
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::BlankLine o; ;[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! #<IRB::Inspector:0x007f46f7ba7d28> ;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[i I"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[i 0o;;[ ; 0;0[@%I"IRB;FcRDoc::NormalModule
| ver. 1.4 |
Github
|
.
| PHP 8.0.30 | Génération de la page: 0 |
proxy
|
phpinfo
|
Réglages