module Sinatra::Templates

def render_ruby(engine, template, options={}, locals={}, &block)

logic shared between builder and nokogiri
def render_ruby(engine, template, options={}, locals={}, &block)
  options, template = template, nil if template.is_a?(Hash)
  template = Proc.new { block } if template.nil?
  render engine, template, options, locals
end