From: Levin Alexander Date: 2005-06-28T13:01:17+09:00 Subject: Re: [ANN] Application-0.6.0 Jim Freeze wrote: >> option :debug, :arity => [1,1], >> :opt_description => "Set debug level from 0 to 9" >> >> args :file1, :file2 > > Here, you are telling the app to expect two arguments. I thought that /option/ defines the possible arguments and /args/ defined which of these are required. I expected ths: | option :debug, :arity => [1,1] to be a definition of the (optional) argument "--debug", which consumes exactly one parameter. >> $ ./testapp.rb --debug 2 file1 file2 > > This results in: > > @file1 #=> "2" > @file2 #=> "file1" > > file2 #=> error > > Can you tell me how you expected the app to respond? $ ./testapp.rb --debug 2 file1 file2 @debug #=> "2" @file1 #=> "file1" @file2 #=> "file2" How is your example app6.rb supposed to work? -- /Levin