Class: QB::Util::STDIO::OutService
- 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
-
#initialize(name, dest) ⇒ OutService
constructor
A new instance of OutService.
- #work_in_thread ⇒ Object
Methods inherited from Service
Constructor Details
#initialize(name, dest) ⇒ OutService
Returns a new instance of OutService.
155 156 157 158 |
# File 'lib/qb/util/stdio.rb', line 155 def initialize name, dest super name @dest = dest end |
Instance Method Details
#work_in_thread ⇒ Object
160 161 162 163 164 165 166 167 168 |
# File 'lib/qb/util/stdio.rb', line 160 def work_in_thread while (line = @socket.gets) do logger.trace "received line", line: line, dest: @dest @dest.puts line end end |