module ExecJS

Constants

VERSION

Attributes

runtime[R]

Public Class Methods

compile(source, options = {}) click to toggle source
# File lib/execjs/module.rb, line 26
def compile(source, options = {})
  runtime.compile(source, options)
end
cygwin?() click to toggle source
# File lib/execjs/module.rb, line 38
def cygwin?
  @cygwin ||= RbConfig::CONFIG["host_os"] =~ /cygwin/
end
eval(source, options = {}) click to toggle source
# File lib/execjs/module.rb, line 22
def eval(source, options = {})
  runtime.eval(source, options)
end
exec(source, options = {}) click to toggle source
# File lib/execjs/module.rb, line 18
def exec(source, options = {})
  runtime.exec(source, options)
end
root() click to toggle source
# File lib/execjs/module.rb, line 30
def root
  @root ||= File.expand_path("..", __FILE__)
end
runtime=(runtime) click to toggle source
# File lib/execjs/module.rb, line 13
def runtime=(runtime)
  raise RuntimeUnavailable, "#{runtime.name} is unavailable on this system" unless runtime.available?
  @runtime = runtime
end
runtimes() click to toggle source
# File lib/execjs/runtimes.rb, line 88
def self.runtimes
  Runtimes.runtimes
end
windows?() click to toggle source
# File lib/execjs/module.rb, line 34
def windows?
  @windows ||= RbConfig::CONFIG["host_os"] =~ /mswin|mingw/
end