Method: ThreadOut.write

Defined in:
lib/spiderfw/utils/thread_out.rb

.write(stuff) ⇒ Object

Writes to Thread.current instead of STDOUT if the thread local is set.



12
13
14
15
16
17
18
# File 'lib/spiderfw/utils/thread_out.rb', line 12

def self.write(stuff)
  if Thread.current[:stdout] then
    Thread.current[:stdout].write stuff 
  else
    STDOUT.write stuff
  end
end