Sha256: c3a883e2ba1c3b560c36d5849f95229cb2ec21d9d182494dd72d014dde3f3fe2
Contents?: true
Size: 765 Bytes
Versions: 10
Compression:
Stored size: 765 Bytes
Contents
class Eco::API::UseCases::Default::People::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
10 entries across 10 versions & 1 rubygems