Sha256: f58bbdfea81482b597ebb8b77add8a0be634efb018caf555424c8bca01967ab9
Contents?: true
Size: 548 Bytes
Versions: 19
Compression:
Stored size: 548 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(data, options, locals, &block) maruku_src = render_erb(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
19 entries across 19 versions & 3 rubygems