From: "Iñaki Baz Castillo" Date: 2008-06-29T01:10:11+09:00 Subject: Re: Is it ellegant to use a global variable to store a Logger object? El Sábado, 28 de Junio de 2008, ara.t.howard escribió: > ruby classes are evaluated top down at load time so, to achieve the > effect of init you just need to delete some code > > module ArtDecomp::Config > @debug = false > @processes = 1 > @qu_method = :graph_merger > @qv_method = :graph_merger > @silicone = Set[Arch[4,2], Arch[5,1]] > > class << self > > attr_accessor :debug, :processes, :qu_method, :qv_method, :silicone > end > end > > and the 'init' code is called at load time. Yeah! I just realized of that today doing some tests. It's really great! -- Iñaki Baz Castillo