Is there a ruby equivalent to the PHP spl_autload_register? -
in php, use spl_autoload_register function lot. allows load classes on demand referenced. there way accomplish same thing in ruby?
you can mimic php __autoload()
behavior (like defining classname filename algotithm , requiring it) redefining object#const_missing
method, called when constant (like classname) not found.
(update: i've updated link above.)
Comments
Post a Comment