Class: EmberScript::EmberScriptTemplate

Inherits:
Tilt::Template
  • Object
show all
Defined in:
lib/ember_script.rb

Constant Summary collapse

@@default_bare =
false

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.default_bareObject



58
59
60
# File 'lib/ember_script.rb', line 58

def self.default_bare
  @@default_bare
end

.default_bare=(value) ⇒ Object



62
63
64
# File 'lib/ember_script.rb', line 62

def self.default_bare=(value)
  @@default_bare = value
end

.engine_initialized?Boolean

Returns:

  • (Boolean)


66
67
68
# File 'lib/ember_script.rb', line 66

def self.engine_initialized?
  true
end

Instance Method Details

#allows_script?Boolean

Returns:

  • (Boolean)


74
75
76
# File 'lib/ember_script.rb', line 74

def allows_script?
  false
end

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



70
71
72
# File 'lib/ember_script.rb', line 70

def evaluate(scope, locals, &block)
  @output ||= EmberScript.compile(data, options)
end

#prepareObject



78
79
80
81
82
# File 'lib/ember_script.rb', line 78

def prepare
  if !options.key?(:bare) and !options.key?(:no_wrap)
    options[:bare] = self.class.default_bare
  end
end