Module: ExecJS
- Defined in:
- lib/execjs.rb,
lib/execjs/module.rb,
lib/execjs/runtimes.rb,
lib/execjs/mustang_runtime.rb,
lib/execjs/external_runtime.rb,
lib/execjs/ruby_racer_runtime.rb,
lib/execjs/ruby_rhino_runtime.rb
Defined Under Namespace
Modules: Runtimes
Classes: Error, ExternalRuntime, MustangRuntime, ProgramError, RubyRacerRuntime, RubyRhinoRuntime, RuntimeError, RuntimeUnavailable
Constant Summary
collapse
- VERSION =
"1.1.3"
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.runtime ⇒ Object
Returns the value of attribute runtime.
12
13
14
|
# File 'lib/execjs/module.rb', line 12
def runtime
@runtime
end
|
Class Method Details
.compile(source) ⇒ Object
27
28
29
|
# File 'lib/execjs/module.rb', line 27
def compile(source)
runtime.compile(source)
end
|
.eval(source) ⇒ Object
23
24
25
|
# File 'lib/execjs/module.rb', line 23
def eval(source)
runtime.eval(source)
end
|
.exec(source) ⇒ Object
19
20
21
|
# File 'lib/execjs/module.rb', line 19
def exec(source)
runtime.exec(source)
end
|
.root ⇒ Object
31
32
33
|
# File 'lib/execjs/module.rb', line 31
def root
@root ||= File.expand_path("..", __FILE__)
end
|
.runtimes ⇒ Object
82
83
84
|
# File 'lib/execjs/runtimes.rb', line 82
def self.runtimes
Runtimes.runtimes
end
|
.windows? ⇒ Boolean
35
36
37
|
# File 'lib/execjs/module.rb', line 35
def windows?
@windows ||= RbConfig::CONFIG["host_os"] =~ /mswin|mingw/
end
|