[MacRuby-devel] Objective-C class +initialize in MacRuby

Caio Chassot lists at caiochassot.com
Sun Oct 10 09:35:49 PDT 2010


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?



More information about the MacRuby-devel mailing list