Class: PAC::Runtimes::RubyRhinoRuntime

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

Defined Under Namespace

Classes: Context

Instance Method Summary collapse

Instance Method Details

#available?Boolean

Returns:

  • (Boolean)


69
70
71
72
73
74
# File 'lib/pac/runtimes/rubyrhino.rb', line 69

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

#compile(source) ⇒ Object



65
66
67
# File 'lib/pac/runtimes/rubyrhino.rb', line 65

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

#nameObject



61
62
63
# File 'lib/pac/runtimes/rubyrhino.rb', line 61

def name
  "therubyrhino (Rhino)"
end