module CoffeeScript::Source
def self.bare_option
def self.bare_option @bare_option ||= contents.match(/noWrap/) ? 'noWrap' : 'bare' end
def self.contents
def self.contents @contents ||= File.read(path) + COMPILE_FUNCTION_SOURCE end
def self.context
def self.context @context ||= ExecJS.compile(contents) end
def self.path
def self.path @path ||= ENV['COFFEESCRIPT_SOURCE_PATH'] || bundled_path end
def self.path=(path)
def self.path=(path) @contents = @version = @bare_option = @context = nil @path = path end
def self.version
def self.version @version ||= contents[/CoffeeScript Compiler v([\d.]+)/, 1] end