Hey, top-posting is annoying. You’re replying above what everyone else
which means people have no context.
On Friday 03 April 2009 16:18:55 Elias O. wrote:
Hi Joel thanks for the reply. The idea is to load them at once. Without
specifying requires inside each class.
Requires don’t need to be inside classes, just files. You can have more
one class per file, or a file that takes up multiple classes.
I have seen that when I put a
series of classes on the rails lib folder everything loads without
problem. I have looked into rails itself, but I don’t get how it does
Rails intercepts Object#cost_missing, and uses that to load anything
same name. Basically, this means that the first time you try to use a
I wrote a little library that does something similar, but with
instead – it’s slightly faster and more flexible:
You can install that, and it will either use activesupport (from Rails),
extlib (used by Merb), depending what’s available (or what you already
If it doesn’t work for you, it should be small enough to be readable.