Bira wrote:
> On 5/5/06, Benjamin Pyles <darushin / gmail.com> 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/.