From: John Lam Date: 2005-12-15T23:59:33+09:00 Subject: Re: Dynamically adding methods to a Ruby class ------=_Part_7592_19298189.1134658766492 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 12/15/05, Robert Klemme wrote: > > Note that this might have adversary effects on other code if consts sprin= g > into existence just like that. > I trimmed most of the code out of that example for clarity, but there will be a bunch of code that will looks up valid types to instantiate and will punt to an old_method_missing call if the constant name is an invalid type. Thanks for the constructor block suggestion - I did have a version sometime last night that used that feature, but I can't recall why I changed it. Cheers, -John http://www.iunknown.com ------=_Part_7592_19298189.1134658766492--