class Opal::CliRunners::Phantomjs

def command

def command
  script_path = File.expand_path('../phantom.js', __FILE__)
  "phantomjs #{script_path.shellescape}"
end

def initialize(output = $stdout)

def initialize(output = $stdout)
  @output = output
end

def run(code, argv)

def run(code, argv)
  unless argv.empty?
    raise ArgumentError, 'Program arguments are not supported on the PhantomJS runner'
  end
  phantomjs = IO.popen(command, 'w', out: output) do |io|
    io.write(code)
  end
  @exit_status = $?.exitstatus
end