From: Brian Candler Date: 2003-07-01T19:04:23+09:00 Subject: Re: anonymous classes On Tue, Jul 01, 2003 at 08:50:31AM +0900, Ian Macdonald wrote: > Hi, > > Could someone please explain to me the concept of an anonymous class? > > I'm talking about this construct: > > class << Foo > ... > end > > I'm having a hard time understanding the books and figuring out when I > might actually want/need to use this. What you've written is called a "singleton class". I wrote this a while: http://www.rubygarden.org/ruby?SingletonTutorial It might be helpful and includes a couple of links to more detailled information. Regards, Brian.