Module: ExecJS
- Defined in:
- lib/execjs.rb,
lib/execjs/json.rb,
lib/execjs/module.rb,
lib/execjs/runtime.rb,
lib/execjs/version.rb,
lib/execjs/runtimes.rb,
lib/execjs/encoding.rb,
lib/execjs/johnson_runtime.rb,
lib/execjs/mustang_runtime.rb,
lib/execjs/disabled_runtime.rb,
lib/execjs/external_runtime.rb,
lib/execjs/ruby_rhino_runtime.rb,
lib/execjs/ruby_racer_runtime.rb
Defined Under Namespace
Modules: Encoding, JSON, Runtimes
Classes: DisabledRuntime, Error, ExternalRuntime, JohnsonRuntime, MustangRuntime, ProgramError, RubyRacerRuntime, RubyRhinoRuntime, Runtime, RuntimeError, RuntimeUnavailable
Constant Summary
- VERSION =
"1.4.0"
Class Attribute Summary (collapse)
Class Method Summary
(collapse)
Class Attribute Details
+ (Object) runtime
Returns the value of attribute runtime
11
12
13
|
# File 'lib/execjs/module.rb', line 11
def runtime
@runtime
end
|
Class Method Details
+ (Object) compile(source)
26
27
28
|
# File 'lib/execjs/module.rb', line 26
def compile(source)
runtime.compile(source)
end
|
+ (Object) eval(source)
22
23
24
|
# File 'lib/execjs/module.rb', line 22
def eval(source)
runtime.eval(source)
end
|
+ (Object) exec(source)
18
19
20
|
# File 'lib/execjs/module.rb', line 18
def exec(source)
runtime.exec(source)
end
|
+ (Object) root
30
31
32
|
# File 'lib/execjs/module.rb', line 30
def root
@root ||= File.expand_path("..", __FILE__)
end
|
+ (Object) runtimes
91
92
93
|
# File 'lib/execjs/runtimes.rb', line 91
def self.runtimes
Runtimes.runtimes
end
|
+ (Boolean) windows?
34
35
36
|
# File 'lib/execjs/module.rb', line 34
def windows?
@windows ||= RbConfig::CONFIG["host_os"] =~ /mswin|mingw/
end
|