From: Gavin Kistner Date: 2004-02-19T02:23:02+09:00 Subject: Re: Builtins RDoc tarball? On Feb 18, 2004, at 10:14 AM, Dave Thomas wrote: > The 1.8 branch in CVS has them too. Hrm. Not the .gz returned by http://www.ruby-lang.org/cgi-bin/download-1.8.1.mrb, FWIW > On Feb 18, 2004, at 10:02, Gavin Kistner wrote: >> While I've got you here...is there a way to get rdoc to document >> multiple call sequences for a method in a .rb file? I tried mimicking >> the style seen in time.c: > > Not currently. Is that something that would be generally useful? Mostly, no :) However, for times where a method does all sorts of weird type checking and variable parameters (notably #new methods that have varied call methods), yes, I think it would. For example, I have: # Can be called in one of five ways: # * MutableTime.new( ) -- same as #now # * MutableTime.new( someString ) -- same as #parse # * MutableTime.new( someSeconds ) -- same as #at # * MutableTime.new( year, month, ... ) -- same as #local # * MutableTime.new( aTimeOrMutableTime ) -- creates a new MutableTime based off of # the supplied Time or MutableTime object def initialize( dateString_Seconds_Time_orYear = nil , *dateTimePieces ) The comments work reasonably well, but to help avoid confusion I feel the need to create horrific variable names in the actual method itself. -- (-, /\ \/ / /\/