Module: Libv8::Paths
- Defined in:
- ext/libv8/paths.rb
Class Method Summary collapse
- .config ⇒ Object
- .include_paths ⇒ Object
- .libv8_object(name) ⇒ Object
- .libv8_profile ⇒ Object
- .object_paths ⇒ Object
- .vendored_source_path ⇒ Object
Class Method Details
.config ⇒ Object
19 20 21 |
# File 'ext/libv8/paths.rb', line 19 def config RbConfig::MAKEFILE_CONFIG end |
.include_paths ⇒ Object
9 10 11 |
# File 'ext/libv8/paths.rb', line 9 def include_paths [Shellwords.escape("#{vendored_source_path}/include")] end |
.libv8_object(name) ⇒ Object
23 24 25 26 27 28 29 |
# File 'ext/libv8/paths.rb', line 23 def libv8_object(name) filename = "#{libv8_profile}/libv8_#{name}.#{config['LIBEXT']}" unless File.exist? filename filename = "#{libv8_profile}/obj.target/tools/gyp/libv8_#{name}.#{config['LIBEXT']}" end return filename end |
.libv8_profile ⇒ Object
31 32 33 34 35 |
# File 'ext/libv8/paths.rb', line 31 def libv8_profile base = "#{vendored_source_path}/out/#{Libv8::Arch.libv8_arch}" debug = "#{base}.debug" File.exist?(debug) ? debug : "#{base}.release" end |
.object_paths ⇒ Object
13 14 15 16 17 |
# File 'ext/libv8/paths.rb', line 13 def object_paths [libv8_object(:base), libv8_object(:snapshot)].map do |path| Shellwords.escape path end end |
.vendored_source_path ⇒ Object
37 38 39 |
# File 'ext/libv8/paths.rb', line 37 def vendored_source_path File. "../../../vendor/v8", __FILE__ end |