Module: MustacheTemplateHandler

Defined in:
lib/nimbleshop/core_ext/mustache_templater_handler.rb

Class Method Summary collapse

Class Method Details

.call(template) ⇒ Object



2
3
4
5
6
7
8
# File 'lib/nimbleshop/core_ext/mustache_templater_handler.rb', line 2

def self.call(template)
  if template.locals.include? :mustache
    "Mustache.render(#{template.source.inspect}, mustache).html_safe"
  else
    "#{template.source.inspect}.html_safe"
  end
end