Sha256: 2dc6e270c6a27cbe48a24a5ff94cc4021de0dc67722f2da1b0f5a128535da717

Contents?: true

Size: 459 Bytes

Versions: 10

Compression:

Stored size: 459 Bytes

Contents

#!/usr/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

10 entries across 10 versions & 1 rubygems

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