From: Daniel Bretoi Date: 2003-10-30T07:33:21+09:00 Subject: Re: getoption long question On Thu, Oct 30, 2003 at 05:35:04AM +0900, Daniel Carrera wrote: > > opts = GetoptLong.new(_ > > ???[ "--create-test", "-T", GetoptLong::NO_ARGUMENT ], > > ) > > > > what if I don't actually want short options such as the -T? (running out > > of suitable letters, or something) > > > > How would I use it then? > > > opts = GetoptLong.new( > [ "--create-test", GetoptLong::NO_ARGUMENT ] > ) > > The short options are optional. GetoptLong is very flexible. You can > have as many or as few short and long options as you like. > > $ cat test.rb > require 'getoptlong' > > opts = GetoptLong.new( > [ "--create-test", GetoptLong::NO_ARGUMENT ] > ) > $ ruby test.rb > $ Thank you. I swear I tried this before asking, and I got errors. Once you ask.... db > > Cheers, > -- > Daniel Carrera | OpenPGP KeyID: 9AF77A88 > PhD grad student. | > Mathematics Dept. | "To understand recursion, you must first > UMD, College Park | understand recursion". -- A.D. 1844: Samuel Morse invents Morse code. Cryptography export restrictions prevent the telegraph's use outside the U.S. and Canada.