I recently found myself writing some Ruby (IronRuby to be specific) at work for
Umbraco that needed to generate HTML for different types of content,
destined to be displayed in an aside column. There are many ways of doing something like this,
but in order to not violate the
Open/Closed Principle, I decided to
create a very simple and naïve plugin framework that would automagically wire up new
content-type handlers.
The way I chose to implement this, was to leverage the meta-programming capabilities in Ruby,
more specifically the inherited
hook.
Continue reading →