Module: Render::React::Config

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

Class Method Summary collapse

Class Method Details

.durabilityObject



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

def durability
  @context_durability
end

.gem_js_pathObject



29
30
31
# File 'lib/render/react/config.rb', line 29

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

.new_contextObject



23
24
25
26
27
# File 'lib/render/react/config.rb', line 23

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

.path(*paths) ⇒ Object



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

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

.pathsObject



19
20
21
# File 'lib/render/react/config.rb', line 19

def paths
  @paths
end

.set_durability(number) ⇒ Object



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

def set_durability(number)
  @context_durability = number
end