module Eco::Source
def self.combined_contents
def self.combined_contents [CoffeeScript::Source.contents, contents].join(";\n") end
def self.contents
def self.contents @contents ||= File.read(path) end
def self.context
def self.context @context ||= ExecJS.compile(combined_contents) end
def self.path
def self.path @path ||= ENV["ECO_SOURCE_PATH"] || bundled_path end
def self.path=(path)
def self.path=(path) @contents = @version = @context = nil @path = path end
def self.version
def self.version @version ||= contents[/Eco Compiler v(.*?)\s/, 1] end