Class: LicenseFinder::CLI::ProjectName

Inherits:
Base
  • Object
show all
Extended by:
Subcommand
Includes:
MakesDecisions
Defined in:
lib/license_finder/cli/project_name.rb

Instance Method Summary collapse

Methods included from Subcommand

banner

Methods included from MakesDecisions

included

Instance Method Details

#add(name) ⇒ Object



17
18
19
20
21
# File 'lib/license_finder/cli/project_name.rb', line 17

def add(name)
  modifying { decisions.name_project(name, txn) }

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

#removeObject



25
26
27
28
29
# File 'lib/license_finder/cli/project_name.rb', line 25

def remove
  modifying { decisions.unname_project(txn) }

  printer.say 'Removed the project name'
end

#showObject



10
11
12
13
# File 'lib/license_finder/cli/project_name.rb', line 10

def show
  printer.say 'Project Name:', :blue
  printer.say decisions.project_name
end