method
Inspector
ruby latest stable - Class:
IRB
Inspector(inspect, init = nil)public
Convenience method to create a new Inspector, using the given inspect proc, and optional init proc and passes them to Inspector.new
irb(main):001:0> ins = IRB::Inspector(proc{ |v| "omg! #{v}" }) irb(main):001:0> IRB.CurrentContext.inspect_mode = ins # => omg! #<IRB::Inspector:0x007f46f7ba7d28> irb(main):001:0> "what?" #=> omg! what?