module CoffeeScript::Source

Public Class Methods

bare_option() click to toggle source
# File lib/coffee_script.rb, line 26
def self.bare_option
  @bare_option ||= contents.match(%rnoWrap/) ? 'noWrap' : 'bare'
end
contents() click to toggle source
# File lib/coffee_script.rb, line 18
def self.contents
  @contents ||= File.read(path)
end
context() click to toggle source
# File lib/coffee_script.rb, line 30
def self.context
  @context ||= ExecJS.compile(contents)
end
path() click to toggle source
# File lib/coffee_script.rb, line 9
def self.path
  @path ||= ENV['COFFEESCRIPT_SOURCE_PATH'] || bundled_path
end
path=(path) click to toggle source
# File lib/coffee_script.rb, line 13
def self.path=(path)
  @contents = @version = @bare_option = @context = nil
  @path = path
end
version() click to toggle source
# File lib/coffee_script.rb, line 22
def self.version
  @version ||= contents[%rCoffeeScript Compiler v([\d.]+)/, 1]
end