Class: Tilt::RDocTemplate
Overview
RDoc template. See: rdoc.rubyforge.org/
It’s suggested that your program require ‘rdoc/markup’ and ‘rdoc/markup/to_html’ at load time when using this template engine.
Instance Attribute Summary
Attributes inherited from Template
Instance Method Summary collapse
Methods inherited from Template
#basename, #compile, #eval_file, #initialize, #name, #render
Constructor Details
This class inherits a constructor from Tilt::Template
Instance Method Details
#compile! ⇒ Object
499 500 501 502 |
# File 'lib/sinatra/tilt.rb', line 499 def compile! markup = RDoc::Markup::ToHtml.new @engine = markup.convert(data) end |
#evaluate(scope, locals, &block) ⇒ Object
504 505 506 |
# File 'lib/sinatra/tilt.rb', line 504 def evaluate(scope, locals, &block) @engine.to_s end |
#initialize_engine ⇒ Object
492 493 494 495 496 497 |
# File 'lib/sinatra/tilt.rb', line 492 def initialize_engine unless defined?(::RDoc::Markup) require_template_library 'rdoc/markup' require_template_library 'rdoc/markup/to_html' end end |