watson-ruby
watson-ruby copied to clipboard
Not sure this is the correct place to put the Ctrl+C capture [lib/watson/command.rb]
filename : lib/watson/command.rb line # : 60 tag : review md5 : 9b282879834ad99eba631c996578d8d0
# [review] - Not sure this is the correct place to put the Ctrl+C capture
trap("INT") do
File.delete(@config.tmp_file) if File.exists?(@config.tmp_file)
exit 2
end
# Parse command line options
# Begin by slicing off until we reach a valid flag
# Always look at first array element in case and then slice off what we need
# Accept parameters to be added / overwritten if called twice
# Slice out from argument until next argument
# Clean up argument list by removing elements until the first valid flag
until _flag_list.include?(args[0]) || args.length == 0
# [review] - Make this non-debug print to user?
debug_print "Unrecognized flag #{ args[0] }\n"