Class: IRB::Context
- Inherits:
-
Object
- Object
- IRB::Context
- Defined in:
- lib/rbtrace/interactive/irb.rb
Instance Method Summary collapse
-
#inspect_last_value(output = +"")) ⇒ Object
IRB renders a result by calling this and printing the
outputbuffer it hands in: since 1.15 it streams the inspected value intooutputrather than using the return value. - #print(arg = nil) ⇒ Object
- #puts(arg = nil) ⇒ Object
Instance Method Details
#inspect_last_value(output = +"")) ⇒ Object
IRB renders a result by calling this and printing the output buffer it hands in: since 1.15 it streams the inspected value into output rather than using the return value. @last_value is the already-inspected String returned by the remote eval, so we write it straight into the buffer.
17 18 19 |
# File 'lib/rbtrace/interactive/irb.rb', line 17 def inspect_last_value(output = +"") output << @last_value.to_s end |
#print(arg = nil) ⇒ Object
9 10 11 |
# File 'lib/rbtrace/interactive/irb.rb', line 9 def print(arg=nil) RBTraceCLI.tracer.print(arg) end |
#puts(arg = nil) ⇒ Object
5 6 7 |
# File 'lib/rbtrace/interactive/irb.rb', line 5 def puts(arg=nil) RBTraceCLI.tracer.puts(arg) end |