Module: Render::React::Config
- Defined in:
- lib/render/react/config.rb
Class Method Summary collapse
- .durability ⇒ Object
- .gem_js_path ⇒ Object
- .new_context ⇒ Object
- .path(*paths) ⇒ Object
- .paths ⇒ Object
- .set_durability(number) ⇒ Object
Class Method Details
.durability ⇒ Object
10 11 12 |
# File 'lib/render/react/config.rb', line 10 def durability @context_durability end |
.gem_js_path ⇒ Object
29 30 31 |
# File 'lib/render/react/config.rb', line 29 def gem_js_path @gem_js_path ||= File.('../../../../js/dist', __FILE__) end |
.new_context ⇒ Object
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 |
.paths ⇒ Object
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 |