Module: ReactRuby::JSCode

Defined in:
lib/react_ruby.rb

Class Method Summary collapse

Class Method Details

.jsxObject



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

def self.jsx
  @jsx ||= read('JSXTransformer.js')
end

.reactObject



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

def self.react
  @react ||= read('react.min.js')
end

.read(filename) ⇒ Object



7
8
9
10
11
12
# File 'lib/react_ruby.rb', line 7

def self.read(filename)
  path = File.expand_path(
    File.join('../../vendor/assets/javascripts', filename),
    __FILE__)
  ::IO.read(path)
end