Class: Transit::Builders::JstBuilder

Inherits:
Tilt::Template
  • Object
show all
Defined in:
lib/transit/builders/jst_builder.rb

Instance Method Summary collapse

Instance Method Details

#evaluate(scope, locals, &block) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'lib/transit/builders/jst_builder.rb', line 10

def evaluate(scope, locals, &block)
  "  (function() {\n    try{\n        transit.template.add(\#{scope.logical_path.inspect}, \"\#{sanitize_js(data)}\");\n      }catch(e){};\n    }).call();\n  JST\nend\n"

#prepareObject



7
8
# File 'lib/transit/builders/jst_builder.rb', line 7

def prepare
end