Class: SprocketsAmd::AMDTemplate

Inherits:
Tilt::Template
  • Object
show all
Defined in:
lib/sprockets-amd/engine.rb

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Class Attribute Details

.configObject

Returns the value of attribute config.



7
8
9
# File 'lib/sprockets-amd/engine.rb', line 7

def config
  @config
end

Class Method Details

.engine_initialized?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/sprockets-amd/engine.rb', line 15

def self.engine_initialized?
  defined? ::AMDTemplateEngine
end

Instance Method Details

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



25
26
27
# File 'lib/sprockets-amd/engine.rb', line 25

def evaluate(scope, locals, &block)
  @output ||= AMDTemplateEngine.new(data, self.class.config).render
end

#initialize_engineObject



19
20
21
# File 'lib/sprockets-amd/engine.rb', line 19

def initialize_engine
  require_template_library 'sprockets-amd/template_engine'
end

#prepareObject



23
# File 'lib/sprockets-amd/engine.rb', line 23

def prepare; end