Module: CoffeeReact::Source

Defined in:
lib/coffee_react.rb

Class Method Summary collapse

Class Method Details

.contentsObject



19
20
21
# File 'lib/coffee_react.rb', line 19

def self.contents
  @contents ||= File.read(path)
end

.contextObject



23
24
25
# File 'lib/coffee_react.rb', line 23

def self.context
  @context ||= ExecJS.compile(contents)
end

.pathObject



10
11
12
# File 'lib/coffee_react.rb', line 10

def self.path
  @path ||= File.expand_path('../coffee-react-transform.js', File.dirname(__FILE__))
end

.path=(path) ⇒ Object



14
15
16
17
# File 'lib/coffee_react.rb', line 14

def self.path=(path)
  @contents = @context = nil
  @path = path
end