At the moment I’m working on a project where I want to dynamically create a set of classes in a RoR application. This handy little snippet will create a class that extends a super class.
Thats pretty easy.
If you want it to happen automatically when you start your Rails app, create a .rb file in /config/initializers …. Any code found in there will be run when the app starts up.