Class: IRB::Irb

Inherits:
Object
  • Object
show all
Defined in:
lib/tailog/ext/irb.rb

Instance Method Summary collapse

Instance Method Details

#output_valueObject



58
59
60
61
62
63
64
65
# File 'lib/tailog/ext/irb.rb', line 58

def output_value
  if IRB.Output
    context = IRB.CurrentContext
    IRB.Output << [ :stdout, context.return_format % context.inspect_last_value ]
  else
    raw_output_value
  end
end


67
68
69
70
71
72
73
# File 'lib/tailog/ext/irb.rb', line 67

def print *args
  if IRB.Output
    IRB.Output << [ :stderr, args.join, caller ]
  else
    raw_print *args
  end
end

#printf(format, *args) ⇒ Object



75
76
77
78
79
80
81
# File 'lib/tailog/ext/irb.rb', line 75

def printf format, *args
  if IRB.Output
    IRB.Output << [ :stderr, format % args, caller ]
  else
    raw_printf format, *args
  end
end

#raw_output_valueObject



54
# File 'lib/tailog/ext/irb.rb', line 54

alias_method :raw_output_value, :output_value

#raw_printObject



55
# File 'lib/tailog/ext/irb.rb', line 55

alias_method :raw_print, :print

#raw_printfObject



56
# File 'lib/tailog/ext/irb.rb', line 56

alias_method :raw_printf, :printf