module Sinatra::Templates
def lookup_template(engine, template, options={})
def lookup_template(engine, template, options={}) case template when Symbol if cached = self.class.templates[template] lookup_template(engine, cached, options) else ::File.read(template_path(engine, template, options)) end when Proc template.call when String template else raise ArgumentError end end