Class: LicenseFinder::CLI::Approvals

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

Instance Method Summary collapse

Methods included from Subcommand

banner

Methods included from MakesDecisions

included

Instance Method Details

#add(*names) ⇒ Object



12
13
14
15
16
17
# File 'lib/license_finder/cli/approvals.rb', line 12

def add(*names)
  assert_some names
  modifying { names.each { |name| decisions.approve(name, txn) } }

  printer.say "The #{names.join(', ')} dependency has been approved!", :green
end

#remove(dep) ⇒ Object



21
22
23
24
25
# File 'lib/license_finder/cli/approvals.rb', line 21

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

  printer.say "The dependency #{dep} no longer has a manual approval"
end