From: Jim Weirich Date: 2004-11-05T01:01:39+09:00 Subject: Re: [RAKE] rdoc task fails on Win2k Austin Ziegler said: >> Is rdoc universally called via a .bat file on all windows installs? Is >> this >> likely to change? Do I need to be more aggresive in determining the >> rdoc >> command name? > > Why not bypass the need for calling the batch file entirely? > > def build_rdoc(files) > r = RDoc::RDoc.new > r.document(["--main", "README", "--title", "Diff::LCS -- A Diff > Algorithm", > "--line-numbers"] + files) > rescue RDoc::RDocError => e > $stderr.puts e.message > rescue Exception => e > $stderr.puts "Couldn't build RDoc documentation\n#{e.message}" > end Also an excellent suggestiong. The #document method in the example, I assume it takes all the standard command line arguments that RDoc accepts. Correct? Any gotchas in this approach? -- -- Jim Weirich jim@weirichhouse.org http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)