Class: Rubish::BatchExecutable
- Inherits:
-
Executable
- Object
- Executable
- Rubish::BatchExecutable
- Defined in:
- lib/rubish/batch_executable.rb
Overview
wraps all the processing in a context with a job (which encapsulates a thread).
Instance Attribute Summary
Attributes inherited from Executable
Instance Method Summary collapse
- #exec ⇒ Object
- #exec! ⇒ Object
-
#initialize(context, &block) ⇒ BatchExecutable
constructor
A new instance of BatchExecutable.
Methods inherited from Executable
#awk, #cd, #each, #each!, #err, #err=, #first, #head, #i, #i=, #io, #last, #map, #map!, #o, #o=, #sed, #tail
Constructor Details
#initialize(context, &block) ⇒ BatchExecutable
Returns a new instance of BatchExecutable.
6 7 8 9 |
# File 'lib/rubish/batch_executable.rb', line 6 def initialize(context,&block) @context = context @proc = block end |
Instance Method Details
#exec ⇒ Object
23 24 25 |
# File 'lib/rubish/batch_executable.rb', line 23 def exec exec!.wait end |