Here is some test code with Option Parser,
it doesn’t seem to work as expected … is it a bug, or am I using it wrong,
the flags I need to use in my app it things like controls and compliance, so short flags are con
or com
each time I use the long flags
in this example, they give an error, guidance will be appreciated
require "option_parser"
OptionParser.parse do |parser|
parser.banner = "Usage: crunch [arguments]"
parser.on("-spo", "--spoon", "Prints out spoon") { puts "spoon" }
parser.on("-spa", "--spanner", "Prints out spanner") { puts "spanner" }
parser.on("-h", "--help", "Show this help") do
puts parser
exit
end
end