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



9
10
11
12
13
14
# File 'lib/license_finder/cli/approvals.rb', line 9

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

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

#remove(dep) ⇒ Object



18
19
20
21
22
# File 'lib/license_finder/cli/approvals.rb', line 18

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

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