From: Jim Freeze Date: 2005-11-07T21:33:02+09:00 Subject: Re: CommandLine-0.7.10 On 11/7/05, Gavin Sinclair wrote: > Jim Freeze wrote: > > > > class App < CommandLine::Application > > > > def initialize > > version "0.0.1" > > author "Author Name" > > copyright "Copyright (c) 2005, Jim Freeze" > > copyright "2005, Jim Freeze" # my bad here > > [...] > > > All feedback is appreciated! > > Two questions: > > * I want to write an application that inherits a different class. Can > I still use this library? Good question. Can you give me an example. When I created this there was much debate over whether to make this a module or a class. IIRC, class was used becuase it was thought that any mixed in functionality should really go in its own class to have SOI. The app class is really just to handle the interface with the user. So, a standard app would look like so: class MyApp < CommandLine::Application def initialize end def main # keep SOI MyBigWorkingClass.new(@option_data) end end > * Does this interact in any way with the stdlib's 'optparse' > (OptionParser class)? No. CommandLine has its own (more powerful) parser called CommandLine::OptionParser. -- Jim Freeze