Sha256: 6e3f5834e57dc051b09539044e5e6a28c6cc45883ee43f97e80deb16a09cd1c3
Contents?: true
Size: 837 Bytes
Versions: 40
Compression:
Stored size: 837 Bytes
Contents
class Eco::API::UseCases::Default::Locations::TagtreeUpload # Class to define the CLI integration of a usecase anywhere it suits. class Cli < Eco::API::UseCases::Cli desc "Uploads the tagtree (assumes nodes don't exist!)" 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("-top-id", "To nest the upload under some existing node (i.e. top node)") do |options| format = SCR.get_arg("-top-id", with_param: true) options.deep_merge!(input: {top_id: format}) end add_option("-structure-id", "Target structure id") do |options| id = SCR.get_arg("-structure-id", with_param: true) options.deep_merge!(source: {structure_id: id}) end end end
Version data entries
40 entries across 40 versions & 1 rubygems