Sha256: f8695884a5be2c1f2ad1233edb72288c08ad455438395a5bc19e25cf5a854494

Contents?: true

Size: 785 Bytes

Versions: 3

Compression:

Stored size: 785 Bytes

Contents

# frozen_string_literal: true

module LicenseFinder
  module CLI
    class IgnoredGroups < Base
      extend Subcommand
      include MakesDecisions

      desc 'list', 'List all the ignored groups'
      def list
        printer.say 'Ignored Groups:', :blue
        say_each(decisions.ignored_groups)
      end

      auditable
      desc 'add GROUP', 'Add a group to be ignored'
      def add(group)
        modifying { decisions.ignore_group(group, txn) }

        printer.say "Added #{group} to the ignored groups"
      end

      auditable
      desc 'remove GROUP', 'Remove a group from the ignored groups'
      def remove(group)
        modifying { decisions.heed_group(group, txn) }

        printer.say "Removed #{group} from the ignored groups"
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
license_finder-7.1.0 lib/license_finder/cli/ignored_groups.rb
license_finder-7.0.1 lib/license_finder/cli/ignored_groups.rb
license_finder-7.0.0 lib/license_finder/cli/ignored_groups.rb