Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Modify RDoc to pick up my attribute metaprogramming methods?

Reply
Thread Tools

Modify RDoc to pick up my attribute metaprogramming methods?

 
 
Clifford Heath
Guest
Posts: n/a
 
      04-03-2007
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.
 
Reply With Quote
 
 
 
 
Clifford Heath
Guest
Posts: n/a
 
      04-04-2007
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 Heath.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
attr_reader, default attribute value, and rdoc of attribute dkmd_nielsen Ruby 6 11-26-2008 05:40 PM
When to pick quad core and when to pick dual core thingy NZ Computing 6 11-21-2006 07:08 AM
When to pick ASP.Net, when to pick desktop? tom c ASP .Net 5 11-01-2006 06:15 PM
RDoc vs metaprogramming Pau Garcia i Quiles Ruby 6 10-16-2006 01:30 PM
Metaprogramming and rdoc Hans Fugal Ruby 3 11-16-2005 09:09 PM



Advertisments