Sha256: b5d935dd6922cc5a73078be9f3cde1509996e80f574d0e6f94034ee714984d6b
Contents?: true
Size: 536 Bytes
Versions: 20
Compression:
Stored size: 536 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| slice.each do |record| record_count += 1 yield(record) end end record_count end end end end
Version data entries
20 entries across 20 versions & 1 rubygems