On Wednesday, October 3, 2012 6:08:31 AM UTC+1, John Merlino wrote:
However, in the above example, I was forced to use the private method.
The documentation says any global methods declared outside of a class
definition - those methods are defined as private instance methods of
Object.
A private method is internal to the implementation of a class, and it
can only be called by other instance methods of the class (or its
subclasses). Private methods are implicitly invoked on self, and may
not be explicitly invoked on an object. If m is a private method, then
you must ibnvoke it in
1) Post the definition of private.
2) Execute this program:
puts 'hello'
3) What conclusions do you draw from that?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups Ruby
on Rails: Talk group.
To post to this group, send
3 matches
Mail list logo