Class: Playbook::Markdown::TemplateHandler
- Inherits:
-
Object
- Object
- Playbook::Markdown::TemplateHandler
- Defined in:
- lib/playbook/markdown/template_handler.rb
Class Method Summary collapse
Class Method Details
.call(template) ⇒ Object
14 15 16 17 |
# File 'lib/playbook/markdown/template_handler.rb', line 14 def call(template) compiled_source = erb.call(template) "#{name}.render(begin;#{compiled_source};end)" end |
.render(template) ⇒ Object
19 20 21 |
# File 'lib/playbook/markdown/template_handler.rb', line 19 def render(template) markdown.render(template).html_safe end |