Sha256: c02493b98122c2bbe91651fb8caf508fa2f87803240eb85bdd0332a6bddfef98
Contents?: true
Size: 568 Bytes
Versions: 33
Compression:
Stored size: 568 Bytes
Contents
require 'maruku' require 'sinatra/base' module Sinatra module Maruku def maruku(template, options={}, locals={}) render :maruku, template, options, locals end private def render_maruku(template, data, options, locals, &block) maruku_src = render_erb(template, data, options, locals, &block) instance = ::Maruku.new(maruku_src, options) if block_given? # render layout instance.to_html_document else # render template instance.to_html end end end helpers Maruku end
Version data entries
33 entries across 33 versions & 3 rubygems