Module: CoffeeReact::Source

Defined in:
lib/coffee_react.rb

Class Method Summary collapse

Class Method Details

.context(filename) ⇒ Object



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

def self.context(filename)
  ExecJS.compile(File.read(self.path(filename)))
end

.jstransform_contextObject



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

def self.jstransform_context
  @jstransform_context ||= self.context('js-syntax-transform.js')
end

.path(filename) ⇒ Object



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

def self.path(filename)
  File.expand_path("../#{filename}", File.dirname(__FILE__))
end

.transform_contextObject



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

def self.transform_context
  @transform_context ||= self.context('coffee-react-transform.js')
end