class ThreadOut
Public Class Methods
new(out)
click to toggle source
# File lib/cxxproject/ext/stdout.rb, line 5 def initialize(out) @out = out end
Public Instance Methods
flush()
click to toggle source
# File lib/cxxproject/ext/stdout.rb, line 32 def flush if Thread.current[:stdout] then Thread.current[:stdout].flush else @out.flush end end
print(stuff='')
click to toggle source
# File lib/cxxproject/ext/stdout.rb, line 24 def print(stuff='') if Thread.current[:stdout] then Thread.current[:stdout].puts stuff else @out.print stuff end end
puts(stuff='')
click to toggle source
# File lib/cxxproject/ext/stdout.rb, line 17 def puts(stuff='') if Thread.current[:stdout] then Thread.current[:stdout].puts stuff else @out.puts stuff end end
write(stuff='')
click to toggle source
# File lib/cxxproject/ext/stdout.rb, line 9 def write(stuff='') if Thread.current[:stdout] then Thread.current[:stdout].write stuff else @out.write stuff end end