Class: PAC::Runtimes::JohnsonRuntime

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

Defined Under Namespace

Classes: Context

Instance Method Summary collapse

Instance Method Details

#available?Boolean

Returns:

  • (Boolean)


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

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

#compile(source) ⇒ Object



74
75
76
# File 'lib/pac/runtimes/johnson.rb', line 74

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

#nameObject



70
71
72
# File 'lib/pac/runtimes/johnson.rb', line 70

def name
  "Johnson (SpiderMonkey)"
end