The following is an excerpt from a project I am working on. This function reads ruby code and turns it into an anonymous class. This class is then instantiated and returned. It allows you to load code from a file dynamically - it can also be reloaded.
The goal for this is to provide a class loader for a web framework experiment I'm working on. Plugins can be loaded and reloaded as many times as is required.
Comments
Leave a comment
Please note, comments must be formatted using Markdown. Links can be enclosed in angle brackets, e.g.
<www.codeotaku.com>
.