From: Paul McMahon Date: 2008-06-12T09:44:21+09:00 Subject: Re: Class (not instance) Initializer > I expected that prefixing the method with self would work. It doesn't. > > ... > self.populate_some_data > > def self.populate_some_data > end > ... Your issue here is that code within a class is executed a line at a time, so populate_some_data is called before it is defined. Also, you don't need to use self when calling populate_some_data, as the method is already called within the scope of the class (though this is just a style issue). So the following code will work: ... def self.populate_some_data end populate_some_data ...