From: Josh Cheek Date: 2012-04-24T15:28:47+09:00 Subject: Re: Where are Ruby's private methods documented online? --f46d0438ede748eb9604be66c5cf Content-Type: text/plain; charset=ISO-8859-1 On Mon, Apr 23, 2012 at 11:24 PM, b1_ __ wrote: > I can't seem to find any documentation for for Ruby's attr_accessor > method online? It is supposed to be in the Module class > (http://ruby-doc.org/core-1.9.3/Module.html). > > I understand that the attr_* family of methods are private methods. > > I found the private methods section for the Module class and the Object > class in the Pick Axe, but even there they are slightly hidden away > because in the Ruby Library Reference section (pg443 of 1.9 version) > private methods aren't mentioned in the intro bit: "Standard classes are > listed alphabetically, followed by the standard modules. Within each, we > list the class (or module) methods, followed by its instance methods." > But then it goes on to list private methods in the Module and Object > classes sections (only place private methods appear, I think?) > > So where can I find attr_accessor in the official Ruby 1.9.3 online > docs? > > There are no official docs. I use rdoc.info and ruby-doc.org when it fails (they each have spotty results, but seem to cover each other's holes). If you go to rdoc.info, select stdlib at the top, then core (first on the list), choose to search for methods and then type "attr_accessor" into the search. It will give you a link to http://rdoc.info/stdlib/core/1.9.3/Module#attr_accessor-instance_method > And a few other related questions: > Is this a comprehensive list of the types of methods? > class > instance > private > protected > public (is public method the same as instance method?) > > Are there any Ruby protected methods? > > What's the convention for writing a private method (a class method is > written e.g. Array::new, an instance method is written e.g. Array#pop) > > Thx > > -- > Posted via http://www.ruby-forum.com/. > > --f46d0438ede748eb9604be66c5cf Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Mon, Apr 23, 2012 at 11:24 PM, b1_ __ <li= sts@ruby-forum.com> wrote:
I can't seem to find any documentation for for Ruby's attr_accessor=
method online? It is supposed to be in the Module class
(h= ttp://ruby-doc.org/core-1.9.3/Module.html).

I understand that the attr_* family of methods are private methods.

I found the private methods section for the Module class and the Object
class in the Pick Axe, but even there they are slightly hidden away
because in the Ruby Library Reference section (pg443 of 1.9 version)
private methods aren't mentioned in the intro bit: "Standard class= es are
listed alphabetically, followed by the standard modules. Within each, we list the class (or module) methods, followed by its instance methods."=
But then it goes on to list private methods in the Module and Object
classes sections (only place private methods appear, I think?)

So where can I find attr_accessor in the official Ruby 1.9.3 online
docs?


There are no official docs. I use rdoc.info and = ruby-doc.org when it fails (they each have spotty results, but seem to = cover each other's holes). If you go to rd= oc.info, select stdlib at the top, then core (first on the list), choos= e to search for methods and then type "attr_accessor" into the se= arch. It will give you a link to=A0http://rdoc.info/stdlib/core/1.= 9.3/Module#attr_accessor-instance_method

=A0
And a few other related questions:
Is this a comprehensive list of the types of methods?
class
instance
private
protected
public (is public method the same as instance method?)

Are there any Ruby protected methods?

What's the convention for writing a private method (a class method is written e.g. Array::new, an instance method is written e.g. Array#pop)

Thx

--
Posted via http://= www.ruby-forum.com/.


--f46d0438ede748eb9604be66c5cf--