Class: Tilt::RstPandocTemplate
- Inherits:
-
PandocTemplate
- Object
- Template
- PandocTemplate
- Tilt::RstPandocTemplate
- Defined in:
- lib/tilt/rst-pandoc.rb
Overview
Pandoc reStructuredText implementation. See: pandoc.org/
Instance Attribute Summary
Attributes inherited from Template
#compiled_path, #data, #file, #line, #options
Instance Method Summary collapse
Methods inherited from PandocTemplate
Methods inherited from Template
#basename, default_mime_type, default_mime_type=, #eval_file, #initialize, metadata, #metadata, #name, #render
Constructor Details
This class inherits a constructor from Tilt::Template
Instance Method Details
#allows_script? ⇒ Boolean
19 20 21 |
# File 'lib/tilt/rst-pandoc.rb', line 19 def allows_script? false end |
#evaluate(scope, locals, &block) ⇒ Object
15 16 17 |
# File 'lib/tilt/rst-pandoc.rb', line 15 def evaluate(scope, locals, &block) @output ||= @engine.to_html.strip end |
#prepare ⇒ Object
10 11 12 13 |
# File 'lib/tilt/rst-pandoc.rb', line 10 def prepare @engine = PandocRuby.new(data, :f => "rst") @output = nil end |