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.
158 159 160 161 |
# File 'lib/qb/util/stdio.rb', line 158 def initialize name, src super name @src = src end |
Instance Method Details
#work_in_thread ⇒ Object
163 164 165 166 167 168 169 |
# File 'lib/qb/util/stdio.rb', line 163 def work_in_thread while (line = @src.gets) do @socket.puts line end close! end |