Class: Pwl::Commands::Delete
Instance Method Summary collapse
Methods inherited from Base
default_locker_file, exit_codes_help
Instance Method Details
#call(args, options) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/pwl/commands/delete.rb', line 4 def call(args, ) exit_with(:name_blank, .verbose) if 0 == args.size || args[0].blank? begin locker = open_locker() rescue Pwl::Dialog::Cancelled exit_with(:aborted, .verbose) end locker.delete(args[0]) msg "Successfully deleted the value under #{args[0]}." if .verbose end |