Where are the white papers for `attr_accessor` and other` Module` methods?

Yesterday I answered a question about how it works attr_accessor. I wanted to link to the method documentation, but, to my surprise, it did not appear on ruby-doc.org . Shouldn't it be documented in Module.html? I am sure that he was there once, ri Module#attr_accessorand APIDock show the correct documentation and Google search gives this page among the first views.

Now I wonder: why did they delete this very common method documentation (as well as other important methods such as Module#define_method)? And where is the official documentation for them?

+5
source share
3 answers

I decided to write E-Mail to the accompanying ruby-doc.org and asked them about the missing documentation of these methods. I got the following answer:

They are private methods and by default are not displayed in rdoc output.

This is an unfortunate situation, because unlike most private methods (the use of which should be avoided, since they are usually performed by the details and not part of the public API) attr_ *, and such are really intended for general use.

Not sure what the right solution is here.

James

In the second mail:

I discussed this with Greg Brown, Eric Hodell and several others who worked to improve rdocs by 1.9.

, , (, ) . , , attr_ *, , - .

rdoc C . , , private, .

, , 1.9 - .

,

. . , :doc:, RDoc Ruby, , C.

. , .

+5

apidoc version

I get everything from there.

Oh, you edited the question.

Yes, it should be there, but it looks like many C methods are no longer there.

+1
source

All Articles