Matthew Harris
7/24/2006 3:52:00 PM
You would probably want to use some metaprogramming to define
const_missing recursively on currently defined constants, and then
it's pretty much the same as PHP's __autoload().
On 7/24/06, Alex Young <alex@blackkettle.org> wrote:
> Alex Young wrote:
> <snip>
> > def Object.const_missing(name)
> > load name.to_lower + ".rb"
> > end
> >
> > That's got a few rough edges, though, to put it mildly...
> >
> I mean, besides the fact that it won't work, unlike Mat's. Should have
> tested that one...
>
> --
> Alex
>
>
--
Matt