Class: Libv8::Compiler::GenericCompiler
- Inherits:
-
Object
- Object
- Libv8::Compiler::GenericCompiler
- Defined in:
- ext/libv8/compiler/generic_compiler.rb
Constant Summary collapse
- GENERIC_VERSION_REGEXP =
/(\d+\.\d+(\.\d+)*)/
- GENERIC_TARGET_REGEXP =
/Target: ([a-z0-9\-_.]*)/
Instance Method Summary collapse
- #call(*arguments) ⇒ Object
- #compatible? ⇒ Boolean
-
#initialize(command) ⇒ GenericCompiler
constructor
A new instance of GenericCompiler.
- #name ⇒ Object
- #target ⇒ Object
- #to_s ⇒ Object
- #version ⇒ Object
Constructor Details
#initialize(command) ⇒ GenericCompiler
Returns a new instance of GenericCompiler.
7 8 9 |
# File 'ext/libv8/compiler/generic_compiler.rb', line 7 def initialize(command) @command = command end |
Instance Method Details
#call(*arguments) ⇒ Object
33 34 35 |
# File 'ext/libv8/compiler/generic_compiler.rb', line 33 def call(*arguments) Compiler::execute_command arguments.unshift(@command).join(' ') end |
#compatible? ⇒ Boolean
29 30 31 |
# File 'ext/libv8/compiler/generic_compiler.rb', line 29 def compatible? false end |
#name ⇒ Object
11 12 13 |
# File 'ext/libv8/compiler/generic_compiler.rb', line 11 def name File.basename @command end |
#target ⇒ Object
24 25 26 27 |
# File 'ext/libv8/compiler/generic_compiler.rb', line 24 def target version_string =~ target_regexp $1 end |
#to_s ⇒ Object
15 16 17 |
# File 'ext/libv8/compiler/generic_compiler.rb', line 15 def to_s @command end |
#version ⇒ Object
19 20 21 22 |
# File 'ext/libv8/compiler/generic_compiler.rb', line 19 def version version_string =~ version_regexp $1 end |