jobeicus / hotmail.com (Joseph Benik) writes: > if i have: > > class Foo > def initialize() > end > > def test() > end > end > > Can someone explain how calling Foo::test works? initialize will > never get called, right? so Foo::test is limited in scope to itself? > can someone just run through an explanation of what's going on? Assuming from your other post that you declared it Foo.test(), then here is the scenerio: Foo is an object, representing a type from which you can construct other objects (which will have the type Foo.) When you say Foo.new, such an object is created, and it is in the context of this instance object where initialize() will be executed. When you call Foo::test, the test function is running in the context of the Foo object itself. A type is a first class object in Ruby. You can create new types at runtime, from which you can instantiate objects. I came from a C++ background and found this a wildly new concept. But I love it. -- Chris