Class: QB::Util::STDIO::OutService

Inherits:
Service
  • Object
show all
Defined in:
lib/qb/util/stdio.rb

Overview

QB STDIO Service to proxy output from modules back to the main user process.

Instance Method Summary collapse

Methods inherited from Service

#close!, #debug, #open!

Constructor Details

#initialize(name, dest) ⇒ OutService

Returns a new instance of OutService.



142
143
144
145
# File 'lib/qb/util/stdio.rb', line 142

def initialize name, dest
  super name
  @dest = dest
end

Instance Method Details

#work_in_threadObject



147
148
149
150
151
152
# File 'lib/qb/util/stdio.rb', line 147

def work_in_thread
  while (line = @socket.gets) do
    debug "#{ @name } received: #{ line.inspect }"
    @dest.puts line
  end
end