Class: PAC::Runtimes::RubyRacerRuntime

Inherits:
Object
  • Object
show all
Defined in:
lib/pac/runtimes/rubyracer.rb

Defined Under Namespace

Classes: Context

Instance Method Summary collapse

Instance Method Details

#available?Boolean

Returns:

  • (Boolean)


79
80
81
82
83
84
# File 'lib/pac/runtimes/rubyracer.rb', line 79

def available?
  require "v8"
  true
rescue LoadError
  false
end

#compile(source) ⇒ Object



75
76
77
# File 'lib/pac/runtimes/rubyracer.rb', line 75

def compile(source)
  Context.new(source)
end

#nameObject



71
72
73
# File 'lib/pac/runtimes/rubyracer.rb', line 71

def name
  "therubyracer (V8)"
end