Sha256: 434da78b9f8b021e6f65b340ffe893daa5bb7d3b6f5d184fd990bc064b0c026c

Contents?: true

Size: 683 Bytes

Versions: 10

Compression:

Stored size: 683 Bytes

Contents

#!/usr/bin/env ruby

require "Getopt/Declare"

specification = <<-'EOFPARAMS'
-ar <r:n>	       		Set aspect ratio (will be clipped to [0..1] )
  				{
  				  r = 0 if r < 0
  				  r = 1 if r > 1
  				}
-w <pixels:+i>			Specify width in pixels
-h <pixels:+i>			Specify height in pixels
-list  <all:i>...		list of numbers
-range <from:i> [- [<to:i>] ]	opt. range
					{ to = 10 if to == 0 }
-parity <p:/even|odd|both/>	Set parity (<p> must be "even",
				"odd" or "both")
-file <name:/\w*\.[A-Z]{3}/>	File name must have a three-
				capital-letter extension
-find <what:/(%T.)+/> ;	        look ahead test

EOFPARAMS


args = Getopt::Declare.new(specification)

print args.inspect

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
getopt-declare-1.32 samples/cmdline_regex.rb
getopt-declare-1.31 samples/cmdline_regex.rb
getopt-declare-1.30 samples/cmdline_regex.rb
getopt-declare-1.29 samples/cmdline_regex.rb
getopt-declare-1.22 samples/cmdline_regex.rb
getopt-declare-1.27 samples/cmdline_regex.rb
getopt-declare-1.25 samples/cmdline_regex.rb
getopt-declare-1.28 samples/cmdline_regex.rb
getopt-declare-1.26 samples/cmdline_regex.rb
getopt-declare-1.23 samples/cmdline_regex.rb