Module: PPipe::MethodMissing
- Included in:
- PPipe
- Defined in:
- lib/parallelpipes.rb
Instance Method Summary collapse
-
#method_missing(*args) ⇒ Object
If redirect is on, the $stdout of any child processes is redirected to the root pipe.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args) ⇒ Object
If redirect is on, the $stdout of any child processes is redirected to the root pipe. method_missing passes the methods to a pipe where this output is stored. Thus, if you call ppipe.gets, you will get the next thing out put by any child process.
784 785 786 787 788 789 |
# File 'lib/parallelpipes.rb', line 784 def method_missing(*args) raise DeadParallelPipe unless @alive raise PPipeFatal.new("calling this doesn't make any sense unless redirect is on") unless @redirect return @user_end.send(*args) end |