optparse question: how to warn of missing positional arguments

Artie Ziff <[email protected]>
Newsgroups gmane.comp.lang.ruby.general
Message-ID <CAP0EqC-qK01B6irRjDpAdqk4U-XTzMNQYHkjFYDDQmYWJ2wbhQ@mail.gmail.com>
Hello,

My goal is to force a display of the banner (usage string) when a
positional parameter is not present; in the sense of ARGV[1] == nil

An possible way would be to force the OptionParse.new block parse to fail
if ARGV[1] == nil. How to do this properly in Ruby?

I love Ruby so much! Thx all!
az


Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.