0
require 'optparse'
params = ARGV.getopts("a:", "AA")
ruby a.rb -a
顯示:如何在ruby中更改optparse的默認錯誤信息?
a.rb:3:in `<main>': missing argument: -a (OptionParser::MissingArgument)
ruby a.rb -b
顯示:
a.rb:3:in `<main>': invalid option: -b (OptionParser::InvalidOption)
我想表明我的幫助信息,我該怎麼做呢?