class Deas::Kramdown::TemplateEngine

Public Instance Methods

compile(template_name, compiled_content) click to toggle source

this is used when chaining engines where another engine initially loads the template file

# File lib/deas-kramdown.rb, line 32
def compile(template_name, compiled_content)
  self.kramdown_source.compile(template_name, compiled_content)
end
kramdown_source() click to toggle source
# File lib/deas-kramdown.rb, line 11
def kramdown_source
  @kramdown_source ||= Source.new(self.source_path, {
    :doc_opts => self.opts['doc_opts'],
    :cache    => self.opts['cache']
  })
end
partial(template_name, locals, &content) click to toggle source

Render straight markdown partial templates. As no ruby will be evaluated the locals and content block will be ignored.

# File lib/deas-kramdown.rb, line 26
def partial(template_name, locals, &content)
  self.kramdown_source.render(template_name)
end
render(template_name, view_handler, locals, &content) click to toggle source

Render straight markdown templates. As no ruby will be evaluated the view handler, locals and content block will be ignored.

# File lib/deas-kramdown.rb, line 20
def render(template_name, view_handler, locals, &content)
  self.kramdown_source.render(template_name)
end