Module: EmberScript::Source

Defined in:
lib/ember_script.rb

Class Method Summary collapse

Class Method Details

.contentsObject



16
17
18
# File 'lib/ember_script.rb', line 16

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

.contextObject



24
25
26
# File 'lib/ember_script.rb', line 24

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

.pathObject



12
13
14
# File 'lib/ember_script.rb', line 12

def self.path
  @path ||= ENV['EMBERSCRIPT_SOURCE_PATH'] || bundled_path
end

.versionObject



20
21
22
# File 'lib/ember_script.rb', line 20

def self.version
  Source.context.eval("EmberScript.VERSION")
end