Sha256: e708e9884d96457376ee3fd373c49deb2b051e25affca5a28feeb439a9f8acd9
Contents?: true
Size: 835 Bytes
Versions: 2
Compression:
Stored size: 835 Bytes
Contents
# frozen_string_literal: true # # Copyright (c) 2020-present, Blue Marble Payroll, LLC # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # module Burner class Jobs module Serialize # Take an array of arrays and create a CSV. # Expected Payload#value input: array of arrays. # Payload#value output: a serialized CSV string. class Csv < Job def perform(_output, payload) payload.value = CSV.generate(options) do |csv| (payload.value || []).each do |row| csv << row end end nil end private def options { headers: false, write_headers: false } end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
burner-1.0.0.pre.alpha.5 | lib/burner/jobs/serialize/csv.rb |
burner-1.0.0.pre.alpha.4 | lib/burner/jobs/serialize/csv.rb |