Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Documenting attributes with Rdoc
darren kirby
9/18/2006 7:12:00 PM
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
--
darren kirby :: Part of the problem since 1976 ::
http://badco...
"...the number of UNIX installations has grown to 10, with more expected..."
- Dennis Ritchie and Ken Thompson, June 1972
2 Answers
James Gray
9/18/2006 7:17:00 PM
0
On Sep 18, 2006, at 2:11 PM, darren kirby wrote:
> How can I do this?
# Docs for one...
attr_reader :one
# Docs for two...
attr_reader :two
# Etc...
Hope that helps.
James Edward Gray II
darren kirby
9/18/2006 7:23:00 PM
0
quoth the James Edward Gray II:
> On Sep 18, 2006, at 2:11 PM, darren kirby wrote:
> > How can I do this?
>
> # Docs for one...
> attr_reader :one
> # Docs for two...
> attr_reader :two
> # Etc...
>
> Hope that helps.
>
> James Edward Gray II
That's perfect!
Thanks James,
-d
--
darren kirby :: Part of the problem since 1976 ::
http://badco...
"...the number of UNIX installations has grown to 10, with more expected..."
- Dennis Ritchie and Ken Thompson, June 1972
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Documenting attributes with Rdoc
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password