From: Wes Gamble Date: 2006-04-12T05:52:27+09:00 Subject: Equivalent of Java static code block in Ruby? All, Is there a notion of a class level "static" code block in Ruby that would get executed whenever the class is loaded? Basically the equivalent of Java's "static {...}" construct? I don't necessarily want to put this in an initialize method because it's just loading up static data from configuration files. Or do I have to put the code into an initialize method in my class and then guard it so that it's only executed once? Thanks, Wes -- Posted via http://www.ruby-forum.com/.