lib/hogan_assets/tilt.rb in hogan_assets-1.0.1 vs lib/hogan_assets/tilt.rb in hogan_assets-1.0.2

- old
+ new

@@ -4,18 +4,13 @@ class Tilt < Tilt::Template self.default_mime_type = 'application/javascript' def evaluate(scope, locals, &block) compiled_template = Hogan.compile(data) - code = data.inspect template_name = scope.logical_path.inspect <<-TEMPLATE - (function() { - this.HoganTemplates || (this.HoganTemplates = {}); - this.HoganTemplates[#{template_name}] = new Hogan.Template(#{code}); - this.HoganTemplates[#{template_name}].r = #{compiled_template}; - return HoganTemplates[#{template_name}]; - }).call(this); + this.HoganTemplates || (this.HoganTemplates = {}); + this.HoganTemplates[#{template_name}] = new Hogan.Template(#{compiled_template}); TEMPLATE end protected