Sha256: 9ba6d00af5fcf48a870a4b955dbfb15cd296423c8764e4d91d47a165a2c61ea7

Contents?: true

Size: 746 Bytes

Versions: 17

Compression:

Stored size: 746 Bytes

Contents

class Eco::API::UseCases::Default::Locations::CodesToTagsCase
  # Class to define the CLI integration of a usecase anywhere it suits.
  class Cli < Eco::API::UseCases::Cli
    str  = "Adds a column 'ecoPortalTag' to the input CSV "
    str << "with the tags that the location codes map to"
    desc str

    callback do |_sess, options, _case|
      file = SCR.get_file(cli_name, required: true, should_exist: true)
      options.deep_merge!(other: {file: {name: file, format: :csv}})
    end

    add_option("-column", "Specify the input column header with the codes") do |options|
      col_codes = SCR.get_arg("-column", with_param: true)
      options.deep_merge!(other: {file: {codes_column: col_codes}})
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
eco-helpers-3.0.21 lib/eco/api/usecases/default/locations/cli/codes_to_tags_cli.rb
eco-helpers-3.0.20 lib/eco/api/usecases/default/locations/cli/codes_to_tags_cli.rb
eco-helpers-3.0.19 lib/eco/api/usecases/default/locations/cli/codes_to_tags_cli.rb
eco-helpers-3.0.18 lib/eco/api/usecases/default/locations/cli/codes_to_tags_cli.rb
eco-helpers-3.0.17 lib/eco/api/usecases/default/locations/cli/codes_to_tags_cli.rb
eco-helpers-3.0.16 lib/eco/api/usecases/default/locations/cli/codes_to_tags_cli.rb
eco-helpers-3.0.15 lib/eco/api/usecases/default/locations/cli/codes_to_tags_cli.rb
eco-helpers-3.0.14 lib/eco/api/usecases/default/locations/cli/codes_to_tags_cli.rb
eco-helpers-3.0.13 lib/eco/api/usecases/default/locations/cli/codes_to_tags_cli.rb
eco-helpers-3.0.12 lib/eco/api/usecases/default/locations/cli/codes_to_tags_cli.rb
eco-helpers-3.0.11 lib/eco/api/usecases/default/locations/cli/codes_to_tags_cli.rb
eco-helpers-3.0.10 lib/eco/api/usecases/default/locations/cli/codes_to_tags_cli.rb
eco-helpers-3.0.9 lib/eco/api/usecases/default/locations/cli/codes_to_tags_cli.rb
eco-helpers-3.0.8 lib/eco/api/usecases/default/locations/cli/codes_to_tags_cli.rb
eco-helpers-3.0.7 lib/eco/api/usecases/default/locations/cli/codes_to_tags_cli.rb
eco-helpers-3.0.6 lib/eco/api/usecases/default/locations/cli/codes_to_tags_cli.rb
eco-helpers-3.0.5 lib/eco/api/usecases/default/locations/cli/codes_to_tags_cli.rb