Hi Caio,

On Oct 10, 2010, at 9:35 AM, Caio Chassot wrote:

> Hi,
> 
> It looks like self.initialize is a no-go:
> 
>    class Foo
>      def self.initialize
>        NSLog("self.initialize is a saaaad panda") # <- never runs
>      end
>    end
> 
> 
> The ruby idiom for that would be just:
> 
>    class Foo
>      NSLog("IM IN UR CLASS INITIALIZEEN FROM RUBY")
>    end
> 
> is that ok in the context of Cocoa applications? Is there a better way?

Indeed, +initialize won't be called for pure-Ruby classes. I recommend to use 
the Ruby idiom here, it's simpler :)

Laurent
_______________________________________________
MacRuby-devel mailing list
MacRuby-devel@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel

Reply via email to