Module: CoffeeScript::Source

### Home Classes Methods

### In Files

- lib/coffee_script.rb

### Methods

- ::bare_option
- ::contents
- ::context
- ::path
- ::path=
- ::version

### Class/Module Index

Quicksearch

- CoffeeScript
- CoffeeScript::Source

No matching classes.

# CoffeeScript::Source

### Constants

COMPILE_FUNCTION_SOURCE

### Public Class Methods

bare_option() click to toggle source

    # File lib/coffee_script.rb, line 45
    def self.bare_option
      @bare_option ||= contents.match(/noWrap/) ? 'noWrap' : 'bare'
    end

contents() click to toggle source

    # File lib/coffee_script.rb, line 37
    def self.contents
      @contents ||= File.read(path) + COMPILE_FUNCTION_SOURCE
    end

context() click to toggle source

    # File lib/coffee_script.rb, line 49
    def self.context
      @context ||= ExecJS.compile(contents)
    end

path() click to toggle source

    # File lib/coffee_script.rb, line 10
    def self.path
      @path ||= ENV['COFFEESCRIPT_SOURCE_PATH'] || bundled_path
    end

path=(path) click to toggle source

    # File lib/coffee_script.rb, line 14
    def self.path=(path)
      @contents = @version = @bare_option = @context = nil
      @path = path
    end

version() click to toggle source

    # File lib/coffee_script.rb, line 41
    def self.version
      @version ||= contents[/CoffeeScript Compiler v([\d.]+)/, 1]
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.