From: Michael Garriss Date: 2003-09-14T14:40:53+09:00 Subject: Re: Dot versus double-colon Michael Garriss wrote: > Hal Fulton wrote: > >> Even though it looks almost like recursion. Hmm, that raises >> the question of why/how this works. >> >> And another issue is: One *could* write a little module that, >> when included in a class, exposed all the class's constants in >> this way. Within five minutes I had it "almost" working. I'll >> bet someone in another timezone or with more caffeine could >> have it working in three. Anyone? >> >> Hal > > > > module Dot > def Dot.append_features( mod ) > mod.constants.each{|c| mod.class_eval( "def self.#{c}() > #{mod}::#{c} end" ) } > end > end > Has to be included after all consts are defined......working on that......