Sha256: f88e6e3b1eef5b6d14dca046c3bd024392af658acb1a2fd5e371ebe9b69adb8c
Contents?: true
Size: 886 Bytes
Versions: 13
Compression:
Stored size: 886 Bytes
Contents
require "execjs/version" require "rbconfig" module ExecJS class Error < ::StandardError; end class RuntimeError < Error; end class ProgramError < Error; end class RuntimeUnavailable < RuntimeError; end class << self attr_reader :runtime def runtime=(runtime) raise RuntimeUnavailable, "#{runtime.name} is unavailable on this system" unless runtime.available? @runtime = runtime end def exec(source) runtime.exec(source) end def eval(source) runtime.eval(source) end def compile(source) runtime.compile(source) end def root @root ||= File.expand_path("..", __FILE__) end def windows? @windows ||= RbConfig::CONFIG["host_os"] =~ /mswin|mingw/ end def cygwin? @cygwin ||= RbConfig::CONFIG["host_os"] =~ /cygwin/ end end end
Version data entries
13 entries across 13 versions & 6 rubygems