On Tuesday 29 March 2005 05:34 am, Glenn Smith wrote:
>
> It's the third one I'm not sure of.  The "self.foo".
>
> What does this do, how and where would I use it?

The self.foo method definition is redefining Test.foo.  It's kind of a 
shorthand notation.  You'd use by saying "Test.foo".  The important lesson 
here, is that class/module definitions are in fact executing ruby code in the 
context of the class/module, hence, there  is a "self" which is the 
class/module object.


David