Class: EXEL::Processors::AsyncProcessor
- Inherits:
-
Object
- Object
- EXEL::Processors::AsyncProcessor
- Defined in:
- lib/exel/processors/async_processor.rb
Overview
Implements the async
instruction by using the configured async provider to run a block asynchronously.
Instance Attribute Summary collapse
-
#provider ⇒ Object
readonly
Returns the value of attribute provider.
Instance Method Summary collapse
-
#initialize(context) ⇒ AsyncProcessor
constructor
A new instance of AsyncProcessor.
- #process(block) ⇒ Object
Constructor Details
#initialize(context) ⇒ AsyncProcessor
Returns a new instance of AsyncProcessor.
9 10 11 12 |
# File 'lib/exel/processors/async_processor.rb', line 9 def initialize(context) @context = context @provider = EXEL.async_provider.new(context) end |
Instance Attribute Details
#provider ⇒ Object (readonly)
Returns the value of attribute provider.
7 8 9 |
# File 'lib/exel/processors/async_processor.rb', line 7 def provider @provider end |
Instance Method Details
#process(block) ⇒ Object
14 15 16 |
# File 'lib/exel/processors/async_processor.rb', line 14 def process(block) @provider.do_async(block) end |