RDoc Improvement Request

M

matt

In searching through the online docs, I noticed that attributes are not
listed in the Methods section to browse for them. Since an attribute is
nothing more than setter/getter methods, I was expecting to find them in
the list.

I'm not 100% that this is RDoc,since I don't know exactly how the online
docs are created, but I am under the impression that they use RDoc's
implementation. If I'm wrong, redirect my compass to where I need to
address this.

Thanks
Matt
 
J

James Britt

matt said:
In searching through the online docs, I noticed that attributes are not
listed in the Methods section to browse for them. Since an attribute is
nothing more than setter/getter methods, I was expecting to find them in
the list.

I'm not 100% that this is RDoc,since I don't know exactly how the online
docs are created, but I am under the impression that they use RDoc's
implementation. If I'm wrong, redirect my compass to where I need to
address this.

If methods are defined using attr_* then rdoc does not list them as methods.

I agree that this is confusing (if not flat out wrong), but I've had
this discussion with various people and this view seems to be the minority.
 
F

Felipe Navas

If methods are defined using attr_* then rdoc does not list them as methods.

I agree that this is confusing (if not flat out wrong), but I've had
this discussion with various people and this view seems to be the minority.

I agree too! Yesterday i send an RDoc to my team partner (very new to
ruby) and she notice this when comparing the UML with Rdoc. This is
very confusing !
 
M

matt

I agree too! Yesterday i send an RDoc to my team partner (very new to
ruby) and she notice this when comparing the UML with Rdoc. This is
very confusing !

My take was based on the documentation of a method as follows from
Module.attr:

module Mod
attr :size, true
end

is equivalent to:

module Mod
def size
@size
end
def size=(val)
@size = val
end
end

So this implies that the attr* are in fact methods...
but it sounds like this dead horse has been beaten in the past.

Who knows, maybe it'll finally get to me and I'll write my own document parser...

Matt
 
C

Chris Carter

I agree too! Yesterday i send an RDoc to my team partner (very new to
ruby) and she notice this when comparing the UML with Rdoc. This is
very confusing !

It is because RDoc parses the actual method definition. Attr_* does
not have the string "\n def * ..." or the like in it.
 
E

Eric Hodel

In searching through the online docs, I noticed that attributes are
not
listed in the Methods section to browse for them. Since an
attribute is
nothing more than setter/getter methods, I was expecting to find
them in
the list.

I'm not 100% that this is RDoc,since I don't know exactly how the
online
docs are created, but I am under the impression that they use RDoc's
implementation. If I'm wrong, redirect my compass to where I need to
address this.

http://rubyforge.org/tracker/?group_id=627
 

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

Similar Threads

[ANN] rdoc 3.5.2 Released 0
[ANN] RDoc 3 6
[ANN] rdoc 2.5 Released 7
[ANN] rdoc 3.6 Released 4
[ANN] rdoc 3.3 Released 0
[ANN] rdoc 2.4.1 Released 0
rdoc files: how to read them? 2
rdoc and virtual attributes 2

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,241
Latest member
Lisa1997

Latest Threads

Top