Class: CsvPatch::StreamBatch
- Inherits:
-
Object
- Object
- CsvPatch::StreamBatch
- Defined in:
- lib/csv_patch/stream_batch.rb
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(stream, batch_size) ⇒ StreamBatch
constructor
A new instance of StreamBatch.
Constructor Details
#initialize(stream, batch_size) ⇒ StreamBatch
Returns a new instance of StreamBatch.
8 9 10 11 |
# File 'lib/csv_patch/stream_batch.rb', line 8 def initialize stream, batch_size @stream = stream @batch_size = batch_size end |
Instance Method Details
#each ⇒ Object
13 14 15 |
# File 'lib/csv_patch/stream_batch.rb', line 13 def each yield next_batch until stream_end? end |