Sha256: 65d85a60346770084cf0e36b4b3f1368050434922b2e9c3c781ceae7d7f3ccfb
Contents?: true
Size: 263 Bytes
Versions: 13
Compression:
Stored size: 263 Bytes
Contents
require 'optparse' parser = OptionParser.new parser.on('-xXXX', ['foo', 'bar'], 'Values for required argument' ) do |value| p ['-x', value] end parser.on('-y [YYY]', ['baz', 'bat'], 'Values for optional argument') do |value| p ['-y', value] end parser.parse!
Version data entries
13 entries across 13 versions & 3 rubygems