Class: LicenseFinder::CLI::Licenses

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

Instance Method Summary collapse

Methods included from Subcommand

banner

Methods included from MakesDecisions

included

Instance Method Details

#add(name, license) ⇒ Object



11
12
13
14
15
# File 'lib/license_finder/cli/licenses.rb', line 11

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

  say "The #{name} dependency has been marked as using #{license} license!", :green
end

#remove(dep, lic) ⇒ Object



19
20
21
22
23
# File 'lib/license_finder/cli/licenses.rb', line 19

def remove(dep, lic)
  modifying { decisions.unlicense(dep, lic, txn) }

  say "The dependency #{dep} no longer has a manual license"
end