Sha256: 1d011ccf069ce89bfc856e39c43370ef4ccb078e1607a3339776fac9061b3962
Contents?: true
Size: 605 Bytes
Versions: 47
Compression:
Stored size: 605 Bytes
Contents
module NoNotifierNeeded module Render def render_template_body_type(template) result = template.template_type == 'haml' ? render_haml(template.body) : render_erb(template.body) result.strip! end def render_template_subject_type(template) result = template.template_type == 'haml' ? render_haml(template.subject) : render_erb(template.subject) result.strip! end def render_haml(template_string) Haml::Engine.new(template_string).render(self) end def render_erb(template_string) ERB.new(template_string).result(binding) end end end
Version data entries
47 entries across 47 versions & 1 rubygems