module ExecJS

def self.runtimes

def self.runtimes
  Runtimes.runtimes
end

def compile(source)

def compile(source)
  runtime.compile(source)
end

def eval(source)

def eval(source)
  runtime.eval(source)
end

def exec(source)

def exec(source)
  runtime.exec(source)
end

def root

def root
  @root ||= File.expand_path("..", __FILE__)
end

def runtime=(runtime)

def runtime=(runtime)
  raise RuntimeUnavailable, "#{runtime.name} is unavailable on this system" unless runtime.available?
  @runtime = runtime
end

def windows?

def windows?
  @windows ||= RbConfig::CONFIG["host_os"] =~ /mswin|mingw/
end