Module: Render::React::Config

Defined in:
lib/render/react/config.rb

Constant Summary collapse

CONTEXT_DURABILITY =
100_000

Class Method Summary collapse

Class Method Details

.gem_js_pathObject



21
22
23
# File 'lib/render/react/config.rb', line 21

def gem_js_path
  @gem_js_path ||= File.expand_path('../../../../js/dist', __FILE__)
end

.new_contextObject



15
16
17
18
19
# File 'lib/render/react/config.rb', line 15

def new_context
  cxt = V8::Context.new
  cxt.load File.join(gem_js_path, 'react.js')
  cxt
end

.path(*paths) ⇒ Object



6
7
8
9
# File 'lib/render/react/config.rb', line 6

def path(*paths)
  @paths ||= []
  @paths += paths
end

.pathsObject



11
12
13
# File 'lib/render/react/config.rb', line 11

def paths
  @paths
end