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)
  <<-JST
  (function() {
    try{
        transit.template.add(#{scope.logical_path.inspect}, "#{sanitize_js(data)}");
      }catch(e){};
    }).call();
  JST
end

#prepareObject



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

def prepare
end