module Orthor class Templates class << self attr_accessor :templates def define(&blk) @templates = {} class_eval &blk end def template(name, markup) @templates[name.to_s] = markup end alias :add :template def [](key) @templates ||= {} @templates[key.to_s] end end end end