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