# Modify RDoc to pick up my attribute metaprogramming methods?

**URL:** <https://www.ruby-forum.com/t/modify-rdoc-to-pick-up-my-attribute-metaprogramming-methods/90975>\
**Category:** Ruby\
**Created:** [April 3, 2007, 2:06pm UTC](https://www.ruby-forum.com/t/modify-rdoc-to-pick-up-my-attribute-metaprogramming-methods/90975 "2007-04-03T14:06:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Clifford\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/49beb7/32.png) [@Clifford\_H](https://www.ruby-forum.com/u/Clifford_H)\
**Post date:** [April 3, 2007, 2:06pm UTC](https://www.ruby-forum.com/t/modify-rdoc-to-pick-up-my-attribute-metaprogramming-methods/90975/1 "2007-04-03T14:06:20Z")

</div>

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 H…

---

<div class="post-metadata">

**Author:** ![Clifford\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/49beb7/32.png) [@Clifford\_H](https://www.ruby-forum.com/u/Clifford_H)\
**Post date:** [April 4, 2007, 10:05am UTC](https://www.ruby-forum.com/t/modify-rdoc-to-pick-up-my-attribute-metaprogramming-methods/90975/2 "2007-04-04T10:05:46Z")

</div>

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…

Anyone?

Clifford H…
