Method: Scripted::Output::CommandLogger#initialize
- Defined in:
- lib/scripted/output/command_logger.rb
#initialize(logger, command) ⇒ CommandLogger
Returns a new instance of CommandLogger.
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/scripted/output/command_logger.rb', line 9 def initialize(logger, command) @logger, @command = logger, command @read, @write = IO.pipe @reader = Thread.new do read.each_char do |char| logger.send_to_formatters :each_char, char, command end end end |