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
16 17 18 |
# File 'ext/libv8/paths.rb', line 16 def config RbConfig::MAKEFILE_CONFIG end |
.include_paths ⇒ Object
8 9 10 |
# File 'ext/libv8/paths.rb', line 8 def include_paths ["#{vendored_source_path}/include"] end |
.libv8_object(name) ⇒ Object
20 21 22 23 24 25 26 |
# File 'ext/libv8/paths.rb', line 20 def libv8_object(name) filename = "#{libv8_profile}/libv8_#{name}.#{config['LIBEXT']}" unless File.exists? filename filename = "#{libv8_profile}/obj.target/tools/gyp/libv8_#{name}.#{config['LIBEXT']}" end return filename end |
.libv8_profile ⇒ Object
28 29 30 31 32 |
# File 'ext/libv8/paths.rb', line 28 def libv8_profile base = "#{vendored_source_path}/out/#{Libv8::Arch.libv8_arch}" debug = "#{base}.debug" File.exists?(debug) ? debug : "#{base}.release" end |
.object_paths ⇒ Object
12 13 14 |
# File 'ext/libv8/paths.rb', line 12 def object_paths [libv8_object(:base), libv8_object(:snapshot)] end |
.vendored_source_path ⇒ Object
34 35 36 |
# File 'ext/libv8/paths.rb', line 34 def vendored_source_path File. "../../../vendor/v8", __FILE__ end |