Class: Handlebars::Amd::Rails::Template

Inherits:
Tilt::Template
  • Object
show all
Includes:
Unindent
Defined in:
lib/handlebars-amd-rails/rails/template.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Unindent

#unindent

Class Method Details

.default_mime_typeObject



35
36
37
# File 'lib/handlebars-amd-rails/rails/template.rb', line 35

def self.default_mime_type
  'application/javascript'
end

Instance Method Details

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



42
43
44
45
# File 'lib/handlebars-amd-rails/rails/template.rb', line 42

def evaluate(scope, locals, &block)
  template = Source.context.call("Handlebars.precompile", data, Handlebars.config.to_camelcase)
  interpolate(template)
end

#prepareObject



39
40
# File 'lib/handlebars-amd-rails/rails/template.rb', line 39

def prepare
end