Class: Ember::ES6Template::CoffeeScript

Inherits:
Tilt::CoffeeScriptTemplate
  • Object
show all
Includes:
CoffeeScriptHelper
Defined in:
lib/ember/es6_template/sprockets/coffee_script.rb,
lib/ember/es6_template/sprockets-legacy/coffee_script.rb

Instance Method Summary collapse

Methods included from CoffeeScriptHelper

#call

Instance Method Details

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



6
7
8
9
10
11
12
13
14
15
# File 'lib/ember/es6_template/sprockets-legacy/coffee_script.rb', line 6

def evaluate(scope, locals, &block)
  filename = scope.pathname.to_s

  @output ||=
    if es6?(filename)
      ::CoffeeScript.compile(data, options.merge(bare: true))
    else
      ::CoffeeScript.compile(data, options)
    end
end