Sha256: d7ed0c3dc6366f051590d0e8d9d6ec26236b9edb274b7b73300f1a0fcb331c1b
Contents?: true
Size: 757 Bytes
Versions: 21
Compression:
Stored size: 757 Bytes
Contents
class Eco::API::UseCases::Default::Utils::SplitCsv class Cli < Eco::API::UseCases::Cli desc "Splits an input file into multiple ones" callback do |_sess, options, _case| file = SCR.get_file(cli_name, required: true, should_exist: true) options.deep_merge!(source: {file: file}) end add_option("-max-rows", "The max count of rows of the output files") do |options| count = SCR.get_arg("-max-rows", with_param: true) options.deep_merge!(output: {file: {max_rows: count}}) end add_option("-start-at", "Get only the last N-start_at rows") do |options| count = SCR.get_arg("-start-at", with_param: true) options.deep_merge!(output: {file: {start_at: count}}) end end end
Version data entries
21 entries across 21 versions & 1 rubygems