From: Nathaniel Talbott Date: 2003-12-01T23:49:00+09:00 Subject: Re: Usage message in optparse.. summarize method? On Dec 1, 2003, at 02:28, nobu.nokada@softhome.net wrote: > Hi, > > At Mon, 1 Dec 2003 12:07:34 +0900, > Nathaniel Talbott wrote: >> ARGV.options do |options| >> options.on('-d', '--date=DATE', String, 'specify a date'){|v| >> puts "Date #{v} passed"} > > If you really want to accept only dates, you can use Date > instead of String here, with requiring 'optparse/date'. Wow. Very cool. Thanks for optparse - I've found it to be extremely useful. It makes it so easy to provide command-line usage information for scripts that it's almost criminal not to. Not to mention that it also makes it a cinch to process command-line options. Nathaniel <:((><