10 Oct
2010
10 Oct
'10
6:33 p.m.
On 2010-10-10, at 15:15 , Matt Aimonetti wrote:
The problem in your example is that in Ruby, the constructor is an instance method, not a class method. So your mistake was to define self.initialize instead of just initialize.
I'm afraid you misunderstood my question. I'm not talking about -init / #initialize. I'm talking about the crazy special +initialize method that Objective-C calls when it first loads a class. You can read about all its idiosyncrasies here: http://mikeash.com/pyblog/friday-qa-2009-05-22-objective-c-class-loading-and... Its lazy nature is what irks me. Code right in the class body in ruby seems to be more in line with Objective-C's +load.