Forum: Ruby Modify RDoc to pick up my attribute metaprogramming methods?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
260b864377cc125e575de59843cb02b3?d=identicon&s=25 Clifford Heath (Guest)
on 2007-04-03 14:06
(Received via mailing list)
Those of you who might have used my Chattr gem will
have found that RDoc doesn't find the attributes it
defines. This is because hidden inside RDoc's Ruby
parser (parsers/parse_rb.rb), in parse_statements,
is a case statement that matches the known kernel
metaprogramming methods.

If you want to add to these methods, you can add them
on the command line if you use --accessors, which is
fine if the syntax is the same (parameters are all
Symbols), but mine aren't.

Really I need a way during Chattr's initialization,
to add an accessor and associated block to RDoc, so
RDoc passes an array of params to the block, from
which it can filter the symbols. That way any program
that requires Chattr automagically gets RDoc for
Chattrs methods.

What do you reckon? Is this a good idea? Is there a
better way? Who do I need to contact about the required
RDoc changes - is this core now?

Clifford Heath.
260b864377cc125e575de59843cb02b3?d=identicon&s=25 Clifford Heath (Guest)
on 2007-04-04 10:05
(Received via mailing list)
Surely enough people are creating metaprogramming
methods that they must also want RDoc to do this?

Ara - how well does RDoc document arrayfields for
example? Wouldn't you want to add something to
arrayfields produces suitable doc for RDoc?
Ok, so the arrayfields extension is dynamic, that
makes it hard... but still...


Clifford Heath.
This topic is locked and can not be replied to.