Tilt::RDiscountTemplate

Discount Markdown implementation. See: github.com/rtomayko/rdiscount

RDiscount is a simple text filter. It does not support scope or locals. The :smart and :filter_html options may be set true to enable those flags on the underlying RDiscount object.

Public Instance Methods

evaluate(scope, locals, &block) click to toggle source
     # File lib/sinatra/tilt.rb, line 625
625:     def evaluate(scope, locals, &block)
626:       @output ||= @engine.to_html
627:     end
flags() click to toggle source
     # File lib/sinatra/tilt.rb, line 611
611:     def flags
612:       [:smart, :filter_html].select { |flag| options[flag] }
613:     end
initialize_engine() click to toggle source
     # File lib/sinatra/tilt.rb, line 615
615:     def initialize_engine
616:       return if defined? ::RDiscount
617:       require_template_library 'rdiscount'
618:     end
prepare() click to toggle source
     # File lib/sinatra/tilt.rb, line 620
620:     def prepare
621:       @engine = RDiscount.new(data, *flags)
622:       @output = nil
623:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.