Class: CDC::Sidekiq::Runtime::DirectPool
- Inherits:
-
Object
- Object
- CDC::Sidekiq::Runtime::DirectPool
- Defined in:
- lib/cdc/sidekiq/runtime.rb
Overview
Minimal runtime used for tests and simple sequential execution.
Instance Method Summary collapse
- #initialize(processor) ⇒ void constructor
-
#process(item) ⇒ Object
Processor result returned by the processor.
-
#process_many(items) ⇒ Array<Object>
Processor results returned by the processor.
Constructor Details
#initialize(processor) ⇒ void
73 74 75 |
# File 'lib/cdc/sidekiq/runtime.rb', line 73 def initialize(processor) @processor = processor end |
Instance Method Details
#process(item) ⇒ Object
Returns processor result returned by the processor.
79 80 81 |
# File 'lib/cdc/sidekiq/runtime.rb', line 79 def process(item) @processor.process(item) end |
#process_many(items) ⇒ Array<Object>
Returns processor results returned by the processor.
85 86 87 |
# File 'lib/cdc/sidekiq/runtime.rb', line 85 def process_many(items) items.map { |item| process(item) }.freeze end |