Forum: Ruby Re: I need some help with OptionsParser

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
F3b7b8756d0c7f71cc7460cc33aefaee?d=identicon&s=25 Berger, Daniel (Guest)
on 2006-03-20 21:13
(Received via mailing list)
>
> c:\temp>

This thread is a testament to why I wrote the getopt package:

# test.rb
require 'getopt/long'
include Getopt

opts = Long.getopts(['--size', '-s', REQUIRED])
p opts['size']

C:\ruby test.rb -s 'Very Big'
"Very Big"

C:\

gem install getopt :)

Regards,

Dan
B1c2bbb71f4e3d8cca7723f028048663?d=identicon&s=25 bcorrigan78@gmail.com (Guest)
on 2006-03-20 21:23
(Received via mailing list)
Works!

Thanks :)
B1c2bbb71f4e3d8cca7723f028048663?d=identicon&s=25 bcorrigan78@gmail.com (Guest)
on 2006-03-20 21:29
(Received via mailing list)
PS: Thanks to everyone for the help!  THought I was crazy here...
This topic is locked and can not be replied to.