module ExecJS

Constants

VERSION

Public Class Methods

compile(source, options = {}) click to toggle source
# File lib/execjs/module.rb, line 24
def compile(source, options = {})
  runtime.compile(source, options)
end
cygwin?() click to toggle source
# File lib/execjs/module.rb, line 36
def cygwin?
  @cygwin ||= RbConfig::CONFIG["host_os"] =~ /cygwin/
end
eval(source, options = {}) click to toggle source
# File lib/execjs/module.rb, line 20
def eval(source, options = {})
  runtime.eval(source, options)
end
exec(source, options = {}) click to toggle source
# File lib/execjs/module.rb, line 16
def exec(source, options = {})
  runtime.exec(source, options)
end
root() click to toggle source
# File lib/execjs/module.rb, line 28
def root
  @root ||= File.expand_path("..", __FILE__)
end
runtime() click to toggle source
# File lib/execjs.rb, line 5
def self.runtime
  @runtime ||= Runtimes.autodetect
end
runtime=(runtime) click to toggle source
# File lib/execjs/module.rb, line 11
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 100
def self.runtimes
  Runtimes.runtimes
end
windows?() click to toggle source
# File lib/execjs/module.rb, line 32
def windows?
  @windows ||= RbConfig::CONFIG["host_os"] =~ /mswin|mingw/
end