[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

RDoc Improvement Request

matt

1/13/2007 4:38:00 PM

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



9 Answers

James Britt

1/13/2007 4:56:00 PM

0

matt wrote:
> 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.



--
James Britt

"If you don't write it down, it never happened."
- (Unknown)

Felipe Navas

1/13/2007 6:33:00 PM

0

On 1/13/07, James Britt <james.britt@gmail.com> wrote:
> matt wrote:
> > 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.

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 !

--
(.) CAMPANHA DA FITA ASCII ( http://ar...)
/ \ Contra formatos proprietarios

matt

1/13/2007 6:50:00 PM

0

On Sun, 2007-01-14 at 03:33 +0900, Felipe Navas wrote:
> On 1/13/07, James Britt <james.britt@gmail.com> wrote:
> > matt wrote:
> > > 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.
>
> 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


Chris Carter

1/14/2007 1:01:00 AM

0

On 1/13/07, Felipe Navas <felipenavas@gmail.com> wrote:
> On 1/13/07, James Britt <james.britt@gmail.com> wrote:
> > matt wrote:
> > > 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.
>
> 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 !
>
> --
> (.) CAMPANHA DA FITA ASCII ( http://ar...)
> / \ Contra formatos proprietarios
>
>

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

--
Chris Carter
concentrationstudios.com
brynmawrcs.com

Eric Hodel

1/14/2007 4:43:00 AM

0

On Jan 13, 2007, at 08:37, matt wrote:

> 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/?gr...

--
Eric Hodel - drbrain@segment7.net - http://blog.se...

I LIT YOUR GEM ON FIRE!


Barb May

3/21/2012 5:07:00 PM

0

RichA wrote:
> Poor, poor leftists. Enraged they have to...admit this was just one
> more looney

His best Yoda impression...
--
Barb


cloud dreamer

3/22/2012 12:56:00 AM

0

On 21/03/2012 11:10 PM, trotsky wrote:
> On 3/21/12 7:40 AM, RichA wrote:
>> On Mar 21, 7:54 am, trotsky<gmsi...@email.com> wrote:
>>> On 3/21/12 6:01 AM, RichA wrote:
>>>
>>>> The right-wing bogieman is even more of a myth today. Leftist news
>>>> editors must be fuming. Now watch, the terrorist angle in the news
>>>> will be replaced with word, "crime." Hypocrites.
>>>
>>> Rich, what the motherfuck are you trying to communicate here? Why is
>>> your brain so constipated? Which medications are you on?
>>
>> Poor, poor leftists. Enraged they have to...admit this was just one
>> more looney MUSLIM
>
>
> Are you really claiming that people on the left are in denial about
> Muslim extremists? Are you retarded?

Heh. Funny how when some American goes off his rocker and shoots a few
people, he's just a "shooter" and not a "Christian extremist" or terrorist.

But if he's Muslim, suddenly he's a terrorist or extremist.

..

--

I told you so. You damned fools.

- H.G. Wells

trotsky

3/22/2012 1:40:00 AM

0

On 3/21/12 7:40 AM, RichA wrote:
> On Mar 21, 7:54 am, trotsky<gmsi...@email.com> wrote:
>> On 3/21/12 6:01 AM, RichA wrote:
>>
>>> The right-wing bogieman is even more of a myth today. Leftist news
>>> editors must be fuming. Now watch, the terrorist angle in the news
>>> will be replaced with word, "crime." Hypocrites.
>>
>> Rich, what the motherfuck are you trying to communicate here? Why is
>> your brain so constipated? Which medications are you on?
>
> Poor, poor leftists. Enraged they have to...admit this was just one
> more looney MUSLIM


Are you really claiming that people on the left are in denial about
Muslim extremists? Are you retarded?

trotsky

3/22/2012 2:09:00 AM

0

On 3/21/12 8:55 PM, cloud dreamer wrote:
> On 21/03/2012 11:10 PM, trotsky wrote:
>> On 3/21/12 7:40 AM, RichA wrote:
>>> On Mar 21, 7:54 am, trotsky<gmsi...@email.com> wrote:
>>>> On 3/21/12 6:01 AM, RichA wrote:
>>>>
>>>>> The right-wing bogieman is even more of a myth today. Leftist news
>>>>> editors must be fuming. Now watch, the terrorist angle in the news
>>>>> will be replaced with word, "crime." Hypocrites.
>>>>
>>>> Rich, what the motherfuck are you trying to communicate here? Why is
>>>> your brain so constipated? Which medications are you on?
>>>
>>> Poor, poor leftists. Enraged they have to...admit this was just one
>>> more looney MUSLIM
>>
>>
>> Are you really claiming that people on the left are in denial about
>> Muslim extremists? Are you retarded?
>
> Heh. Funny how when some American goes off his rocker and shoots a few
> people, he's just a "shooter" and not a "Christian extremist" or terrorist.
>
> But if he's Muslim, suddenly he's a terrorist or extremist.


Can't a crackpot just be a crackpot? That's certainly how "Rich" lives
his life!