Class: QB::Util::STDIO::InService
- Defined in:
- lib/qb/util/stdio.rb
Overview
QB STDIO Service to proxy interactive user input from the main process to modules.
Instance Method Summary collapse
-
#initialize(name, src) ⇒ InService
constructor
A new instance of InService.
- #work_in_thread ⇒ Object
Methods inherited from Service
Constructor Details
#initialize(name, src) ⇒ InService
Returns a new instance of InService.
174 175 176 177 |
# File 'lib/qb/util/stdio.rb', line 174 def initialize name, src super name @src = src end |
Instance Method Details
#work_in_thread ⇒ Object
179 180 181 182 183 184 185 |
# File 'lib/qb/util/stdio.rb', line 179 def work_in_thread while (line = @src.gets) do @socket.puts line end close! end |