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:
# * <tt>MutableTime.new( )</tt> -- same as #now
# * <tt>MutableTime.new( someString )</tt> -- same as #parse
# * <tt>MutableTime.new( someSeconds )</tt> -- same as #at
# * <tt>MutableTime.new( year, month, ... )</tt> -- same as #local
# * <tt>MutableTime.new( aTimeOrMutableTime )</tt> -- 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.
--
(-, /\ \/ / /\/