seattlerb/zenweb — pull request #6 by tamc (2012-07-15 21:58:29+00:00)
Title: Alternative plugin approach that would allow, for instance simultaneous markdown and textile flavours of the sitemap method

Ok. The problem is that I would like it to be possible to have helper methods with the same names but different results to coexist (so that, for instance, there could be markdown and textile flavours of the sitemap method).

A solution, inspired a bit by nanoc, is to move all the rendering code into separate classes that all subclass a new ```Renderer``` class. The ```Page#subrender``` method then creates new instances of those classes to process the content. The classes contain whatever helper methods work with that renderer and then forward anything else onto the underlying page instance.

Strength: fixes the problem. Weakness: more complexity.

Thoughts?