Method: Miscellany::BatchProcessor#initialize
- Defined in:
- lib/miscellany/batch_processor.rb
#initialize(of: 1000, ensure_once: false, &blk) ⇒ BatchProcessor
Returns a new instance of BatchProcessor.
13 14 15 16 17 18 19 20 |
# File 'lib/miscellany/batch_processor.rb', line 13 def initialize(of: 1000, ensure_once: false, &blk) @batch_size = of @block = blk @ensure_once = ensure_once @current_batch = [] @flush_count = 0 end |