Documenting attributes with Rdoc

D

darren kirby

Hello all,

I have written a Lib here that parses Flac files for information, and as
the 'important' stuff is written to various attributes I want to document
their data structure, as some of them are quite complex and require
explanation. I cannot figure out how to get Rdoc to work with them.

I have them all in an attr_reader, and Rdoc finds them and puts an [R] next to
them which I presume indicates they are readonly. That's all good but when I
add some documentation above the attr_reader Rdoc adds the same text to all 8
of my attributes.

I thought that I would trying creating the attributes the long way, ie:

def foo
@foo
end

and document them that way, but when I do this Rdoc lumps them under instance
methods, which is of course technically correct but I don't want that, I want
them listed under attributes.

How can I do this? Should I just document them under the main package
description?

thanks,
-d
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top