Sha256: e8e44a6dd6bf02bbb5219258bb54cd1d0b185cd28d182841b896081d45a52c01

Contents?: true

Size: 455 Bytes

Versions: 4

Compression:

Stored size: 455 Bytes

Contents

#!/bin/env ruby

require "Getopt/Declare"

specification = %q(
     [strict]     
     [pvtype: num      /\d+/    { reject if Time.new.localtime.day==3 }  ]
     [pvtype: 'a num'  :n       { puts "a num!"  }               ]
     [pvtype: %q{nbr}  :'a num' { reject $no_nbr }               ]

		   -count1 <n:num>		  test
		   -count2 <n:a num>		  test2
		   -count3 <n:nbr>		  test3

     )

args = Getopt::Declare.new(specification)

print args.inspect

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
getopt-declare-1.13 samples/cmdline_pvtype2.rb
getopt-declare-1.21 samples/cmdline_pvtype2.rb
getopt-declare-1.20 samples/cmdline_pvtype2.rb
getopt-declare-1.12 samples/cmdline_pvtype2.rb