Sha256: d799bd25b559ff2a7c44e44dde102e40b4b95320025b1c2e4045596f80f9ce65
Contents?: true
Size: 582 Bytes
Versions: 3
Compression:
Stored size: 582 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
sinatra-maruku-1.0.0.2 | lib/sinatra/maruku.rb |
sinatra-maruku-0.9.4.1 | lib/sinatra/maruku.rb |
sinatra-maruku-0.9.4.0 | lib/sinatra/maruku.rb |