ruby/doc/optparse/ruby/argument_keywords.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

7 строки
152 B
Ruby
Исходник Обычный вид История

require 'optparse'
parser = OptionParser.new
parser.on('-x', '--xxx', :REQUIRED, 'Required argument') do |value|
p ['--xxx', value]
end
parser.parse!