Class: Emblem::Sprockets::Template
- Inherits:
-
Tilt::Template
- Object
- Tilt::Template
- Emblem::Sprockets::Template
- Defined in:
- lib/emblem/sprockets/template.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.default_mime_type ⇒ Object
8 9 10 |
# File 'lib/emblem/sprockets/template.rb', line 8 def self.default_mime_type 'application/javascript' end |
Instance Method Details
#evaluate(scope, locals, &block) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/emblem/sprockets/template.rb', line 14 def evaluate(scope, locals, &block) target = template_target(scope) template = data if raw?(scope) template = precompile_emblem(template) else template = precompile_ember_emblem(template) end "#{target} = #{template}\n" end |
#prepare ⇒ Object
12 |
# File 'lib/emblem/sprockets/template.rb', line 12 def prepare; end |