1
0
Fork 0
mirror of https://github.com/rails/execjs synced 2023-03-27 23:21:20 -04:00
execjs/lib/execjs.rb
2011-02-06 20:57:51 -06:00

20 lines
411 B
Ruby

module ExecJS
class Error < ::StandardError; end
class RuntimeError < Error; end
class ProgramError < Error; end
autoload :ExternalRuntime, "execjs/external_runtime"
autoload :Runtimes, "execjs/runtimes"
def self.exec(source)
runtime.exec(source)
end
def self.eval(source)
runtime.eval(source)
end
def self.runtime
@runtime ||= Runtimes.best_available
end
end