module Odex::Templates::Helpers
Public Instance Methods
render(template, locals = {})
click to toggle source
# File lib/odex/modules/templates.rb, line 7 def render template, locals = {}, options = {}, &block template_cache.fetch(template) do Slim::Template.new(template, options) end.render(self, locals, &block) end
template_cache()
click to toggle source
# File lib/odex/modules/templates.rb, line 13 def template_cache Thread.current[:template_cache] ||= Tilt::Cache.new end