Module: Handlebars::Amd::Rails::Source

Defined in:
lib/handlebars-amd-rails/rails/template.rb

Class Method Summary collapse

Class Method Details

.contentsObject



21
22
23
# File 'lib/handlebars-amd-rails/rails/template.rb', line 21

def self.contents
  @contents ||= File.read(path)
end

.contextObject



25
26
27
# File 'lib/handlebars-amd-rails/rails/template.rb', line 25

def self.context
  @context ||= ExecJS.compile(contents)
end

.pathObject



17
18
19
# File 'lib/handlebars-amd-rails/rails/template.rb', line 17

def self.path
  @path ||= File.expand_path("../../../../vendor/assets/javascripts/handlebars.js", __FILE__)
end