Class: MarkdownRails::Handler::Erb
- Defined in:
- lib/markdown-rails/handler/erb.rb
Constant Summary
Constants inherited from Markdown
Instance Method Summary collapse
Methods inherited from Markdown
handle, #initialize, register_default_handler
Constructor Details
This class inherits a constructor from MarkdownRails::Handler::Markdown
Instance Method Details
#call(template, source = template.source) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/markdown-rails/handler/erb.rb', line 4 def call(template, source = template.source) compiled_source = compile_erb template, source # TODO: This won't properly handle initializer blocks. Somehow # I need to pass a reference to the block that's passed in. "#{markdown.class.name}.new.renderer.render(begin;#{compiled_source};end).html_safe" end |