Re: RDoc generates a dangling hyperlink with :stopdoc without :startdoc:

From: Gavin Sinclair <gsinclair@...>
Date: 2004-04-11 10:49:34 UTC
List: ruby-core #2771
On Sunday, April 11, 2004, 2:12:12 AM, Dave wrote:


> On Apr 10, 2004, at 10:15, Tanaka Akira wrote:

>> For example, RDoc generates a hyperlink to classes/M.html which is not
>> exists as follows.
>>
>> % cat a.rb
>> module M
>>   def m1() end
>>
>>   # :stopdoc:
>>
>>   def m2() end
>> end


> Hmm... Here I'm not sure what to do. I suspect that I really should 
> change the definition of :stopdoc: so that it _does_ document the 
> module and m1, but not m2. That way there'll be context for m1(). 
> However, at the back of my mind I remember that someone asked for the
> current behavior.

> Can anyone see any good reason why I shouldn't change RDoc so that 
> :stodoc: just applies to elements within a class or module, and not the
> class or module itself?

No, I think that's a good idea.

Intuitively, to me, :stopdoc: should _only_ apply to the rest of the
current scope.  That is, given the code below, all methods except
M1::m2 should be documented.

  module M1
    def m1() end
    # :stopdoc:
    def m2() end
  end

  module M2
    def m1() end
    def m2() end
  end

In fact, that's exactly what happens :)

(Except, of course, the problem Tanaka-san pointed out: when you
select "m1 (M1)" from the "Methods" frame, you get a bum steer.)

By the way, if you put :enddoc: instead of :stopdoc: in the above
code, everything works.

So why do we need :enddoc: again?

Gavin




In This Thread

Prev Next