Sha256: 7150202157b80fa2c4c0f79bec27787280222511677c22d9d434e396e30d1bef
Contents?: true
Size: 610 Bytes
Versions: 4
Compression:
Stored size: 610 Bytes
Contents
require "tempfile" module RocketJob module Sliced class Output < Slices def download(header_line: nil) raise(ArgumentError, "Block is mandatory") unless block_given? # Write the header line yield(header_line) if header_line # Call the supplied block for every record returned record_count = 0 each do |slice| # TODO: Add slice_id to named tags to aid problem determination slice.each do |record| record_count += 1 yield(record) end end record_count end end end end
Version data entries
4 entries across 4 versions & 1 rubygems