Module: ActiveCopy::Template
- Defined in:
- lib/active_copy/template.rb
Class Method Summary collapse
Class Method Details
.call(template) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/active_copy/template.rb', line 6 def self.call template source = if template.respond_to? :split template.split("---\n")[2] else template.source.split("---\n")[2] end <<-RUBY markdown = ActiveCopy::Markdown.new markdown.render %(#{source}) RUBY end |