Class: Processor::Runner
- Inherits:
-
Object
- Object
- Processor::Runner
- Defined in:
- lib/processor/runner.rb
Instance Method Summary collapse
-
#initialize(processor) ⇒ Runner
constructor
A new instance of Runner.
- #run(process_runner) ⇒ Object
Constructor Details
#initialize(processor) ⇒ Runner
Returns a new instance of Runner.
3 4 5 |
# File 'lib/processor/runner.rb', line 3 def initialize(processor) @processor = processor end |
Instance Method Details
#run(process_runner) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/processor/runner.rb', line 7 def run(process_runner) processor.start process_runner.call processor processor.finish rescue Exception => exception processor.error exception raise exception ensure processor.finalize end |