Sha256: c77e884150ea0485633d689805e9feb6f71dcfeb4e8824f70afd099b8b34180a

Contents?: true

Size: 723 Bytes

Versions: 3

Compression:

Stored size: 723 Bytes

Contents

# frozen_string_literal: true

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

      desc 'show', 'Show the project name'
      def show
        printer.say 'Project Name:', :blue
        printer.say decisions.project_name
      end

      auditable
      desc 'add NAME', 'Set the project name'
      def add(name)
        modifying { decisions.name_project(name, txn) }

        printer.say "Set the project name to #{name}", :green
      end

      auditable
      desc 'remove', 'Remove the project name'
      def remove
        modifying { decisions.unname_project(txn) }

        printer.say 'Removed the project name'
      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/project_name.rb
license_finder-7.0.1 lib/license_finder/cli/project_name.rb
license_finder-7.0.0 lib/license_finder/cli/project_name.rb