From: "R.. Kumar" Date: 2010-06-21T20:34:00+09:00 Subject: Re: State of the union for Ruby CLI libraries? Robert Klemme wrote: >> >> Is there any way of doing this ? > > Well, either you revert back to creating all sub OptionParsers or you > store the description in some other place. > > Kind regards > > robert Actually i did find a way out !! Earlier in the loop, I was doing: desc = opt.description Now I do: opt.call.description cmdtext = "Commands are:" @commands.each_pair do |c, opt| desc = opt.call.description cmdtext << "\n #{c} : #{desc}" end Works. I modified my app to use this, it was easy since both use OptionParser. I added aliases. But my app has slightly more complex aliases where one command maps to multiple words. Working on that currently. -- Posted via http://www.ruby-forum.com/.