# encoding: UTF-8 # frozen_string_literal: true require 'nrser/refinements/types' using NRSER::Types # Namespace # ======================================================================= module Locd module CLI module Command # Definitions # ======================================================================= class Agent < Base desc "rm PATTERN [OPTIONS]", "Remove (uninstall, delete) a agent" map remove: :rm include_shared t[ groups: t.has_any( :pattern, :multi ) ] option :logs, desc: "Remove logs too", type: :boolean, default: false def rm kwds = option_kwds :logs find_multi!( pattern ).each { |agent| agent.remove **kwds } end end # /Namespace # ======================================================================= end # module Command end # module CLI end # module Locd