module CoffeeScript::Source
Constants
- COMPILE_FUNCTION_SOURCE
Public Class Methods
Source
# File lib/coffee_script.rb, line 45 def self.bare_option @bare_option ||= contents.match(/noWrap/) ? 'noWrap' : 'bare' end
Source
# File lib/coffee_script.rb, line 37 def self.contents @contents ||= File.read(path) + COMPILE_FUNCTION_SOURCE end
Source
# File lib/coffee_script.rb, line 49 def self.context @context ||= ExecJS.compile(contents) end
Source
# File lib/coffee_script.rb, line 10 def self.path @path ||= ENV['COFFEESCRIPT_SOURCE_PATH'] || bundled_path end
Source
# File lib/coffee_script.rb, line 14 def self.path=(path) @contents = @version = @bare_option = @context = nil @path = path end
Source
# File lib/coffee_script.rb, line 41 def self.version @version ||= contents[/CoffeeScript Compiler v([\d.]+)/, 1] end