Class: Quickdraw::Worker
- Inherits:
-
Object
- Object
- Quickdraw::Worker
- Defined in:
- lib/quickdraw/worker.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(pid:, pipe:) ⇒ Worker
constructor
A new instance of Worker.
- #wait ⇒ Object
Constructor Details
#initialize(pid:, pipe:) ⇒ Worker
Returns a new instance of Worker.
16 17 18 19 |
# File 'lib/quickdraw/worker.rb', line 16 def initialize(pid:, pipe:) @pid = pid @pipe = pipe end |
Class Method Details
Instance Method Details
#wait ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/quickdraw/worker.rb', line 21 def wait Process.wait(@pid) @pipe.with_reader do |reader| reader.read end end |