From: "Shot (Piotr Szotkowski)" Date: 2008-06-30T03:31:20+09:00 Subject: Re: Is it ellegant to use a global variable to store a Logger object? --4Ckj6UjgE2iN1+kY Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I=C3=B1aki Baz Castillo: >> ara.t.howard: >>> ruby classes are evaluated top down at load time so, to >>> achieve the effect of init you just need to delete some code >> =E2=80=A6 >>> and the 'init' code is called at load time. > The problem here is that those code is runned in load time, so if that > code depends on other project libraries or classes you must take care > of loading them first. This is not problem when calling "init" after > loading all the classes or when using "normal" objects (XXXX.new). Right. I also figured out that in my case, I need to be able to reset the config class to its default state when testing it, so I need an init/reset method anyway. -- Shot --=20 I don't want to call a destructor on my objects, I want to call a destroyer. Gozer has come for your memory, little PersistentNode! -- Joel Gluth, asr --4Ckj6UjgE2iN1+kY Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (GNU/Linux) iD8DBQFIZ9cgi/mCfdEo8UoRAvM3AJ0RDi8YkmXYKz9nel9ibv73CuweagCfbHgn X5fDsSe1uU1/3RyH8ci3v6s= =iEB9 -----END PGP SIGNATURE----- --4Ckj6UjgE2iN1+kY--