Class: LicenseFinder::CLI::PermittedLicenses
- Extended by:
- Subcommand
- Includes:
- MakesDecisions
- Defined in:
- lib/license_finder/cli/permitted_licenses.rb
Instance Method Summary collapse
Methods included from Subcommand
Methods included from MakesDecisions
Instance Method Details
#add(*licenses) ⇒ Object
17 18 19 20 21 |
# File 'lib/license_finder/cli/permitted_licenses.rb', line 17 def add(*licenses) assert_some licenses { licenses.each { |l| decisions.permit(l, txn) } } printer.say "Added #{licenses.join(', ')} to the permitted licenses" end |
#list ⇒ Object
10 11 12 13 |
# File 'lib/license_finder/cli/permitted_licenses.rb', line 10 def list printer.say 'Permitted Licenses:', :blue say_each(decisions.permitted, &:name) end |
#remove(*licenses) ⇒ Object
25 26 27 28 29 |
# File 'lib/license_finder/cli/permitted_licenses.rb', line 25 def remove(*licenses) assert_some licenses { licenses.each { |l| decisions.unpermit(l, txn) } } printer.say "Removed #{licenses.join(', ')} from the license permitted licenses" end |