class Tolaria::MarkdownRendererProxy
Contains a workflow for rendering Markdown. If no renderer has been configured, defers to `simple_format`.
Public Instance Methods
render(document)
click to toggle source
Calls the configured Markdown renderer, if none exists then uses `simple_format` to return more than nothing.
# File lib/tolaria/markdown.rb, line 11 def render(document) if Tolaria.config.markdown_renderer.nil? return simple_format(document) else @markdown_renderer ||= Tolaria.config.markdown_renderer.constantize return @markdown_renderer.render(document) end end