J
Justin
I have just started learning Ruby and I am going through as much
documentation as I can find. The only question that I cannot seem to
find an answer to concerns the use of the # symbol when referring to
methods (I think I've seen it used to refer to both class and instance
methods).
Here is an example:
http://www.rubycentral.com/book/ref_c_io.html#IO.select
On the above page there is a link to "Kernel#select" which is a class
method.
and here:
http://www.rubycentral.com/book/ref_c_object.html#Object.is_a_qm
There is a link to "Object#kind_of?" which is an instance method.
Clearly the purpose of the hash mark has another purpose. Anyone know
what document explains this?
Thanks!
Justin
documentation as I can find. The only question that I cannot seem to
find an answer to concerns the use of the # symbol when referring to
methods (I think I've seen it used to refer to both class and instance
methods).
Here is an example:
http://www.rubycentral.com/book/ref_c_io.html#IO.select
On the above page there is a link to "Kernel#select" which is a class
method.
and here:
http://www.rubycentral.com/book/ref_c_object.html#Object.is_a_qm
There is a link to "Object#kind_of?" which is an instance method.
Clearly the purpose of the hash mark has another purpose. Anyone know
what document explains this?
Thanks!
Justin