[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: I need some help with OptionsParser

Berger, Daniel

3/20/2006 8:13:00 PM

> -----Original Message-----
> From: bcorrigan78@gmail.com [mailto:bcorrigan78@gmail.com]
> Sent: Monday, March 20, 2006 12:59 PM
> To: ruby-talk ML
> Subject: Re: I need some help with OptionsParser
>
>
> Nada.. This isn't working either:
>
> c:\temp>test.rb -s "Very Big"
>
> 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



2 Answers

Brian Corrigan

3/20/2006 8:22:00 PM

0

Works!

Thanks :)

Brian Corrigan

3/20/2006 8:25:00 PM

0

PS: Thanks to everyone for the help! THought I was crazy here...