From: Bhrgunatha Deva Date: 2006-03-21T19:20:25+09:00 Subject: Class (not instance) initializers Newbie question: Is there an equivalent to a static constructor in ruby? something like: class MyClass # want this to run before any instances of MyClass are created def class_initialize self.some_complex_initialisation end end At the moment I'm using: class MyClass def initialize @@init = self.some_complex_initialisation if @@init.nil? end end I'd love to know if there is a more rubyesque way of doing this Bhrgunatha.