blob: c4dfdeb31e074e4819a2a9ac9d1df5ef134eb4dc (
plain)
1
2
3
4
5
6
7
8
9
|
require 'optparse'
parser = OptionParser.new
parser.on('--xxx', 'Option with no argument') do |value|
p ['Handler block for -xxx called with value:', value]
end
parser.on('--yyy YYY', 'Option with required argument') do |value|
p ['Handler block for -yyy called with value:', value]
end
parser.parse!
|