From: Benjamin Pyles Date: 2006-05-06T04:11:22+09:00 Subject: Re: Question on self (Newbie) Bira wrote: > On 5/5/06, Benjamin Pyles wrote: > >> Now I understand the self.name and self password reference the calling >> object. However, I am still trying to figure out why in this example the >> function is prefixed with self. > > In your example, declaring "login" as "self.login" means it's a class > method (similar to a static method in Java). It belongs to the User > class, rather than to a specific instance or User, which means you > don't need to instantiate a new User object in order to use it. Thanks for the clarification, it really helps clear things up. Ben -- Posted via http://www.ruby-forum.com/.