Sha256: 11b0250ec58b6b3fc72d50b70b43021779c80e49b9570da050a5e63b9554cf8b
Contents?: true
Size: 403 Bytes
Versions: 13
Compression:
Stored size: 403 Bytes
Contents
# Require the OptionParser code. require 'optparse' # Create an OptionParser object. parser = OptionParser.new # Define one or more options. parser.on('-x', 'Whether to X') do |value| p ['x', value] end parser.on('-y', 'Whether to Y') do |value| p ['y', value] end parser.on('-z', 'Whether to Z') do |value| p ['z', value] end # Parse the command line and return pared-down ARGV. p parser.parse!
Version data entries
13 entries across 13 versions & 3 rubygems