Method: WebkitRemote::Browser#initialize
- Defined in:
- lib/webkit_remote/browser.rb
#initialize(opts = {}) ⇒ Browser
Sets up a debugging connection to a Webkit process.
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/webkit_remote/browser.rb', line 24 def initialize(opts = {}) if opts[:process] @process = opts[:process] @stop_process = opts.fetch :stop_process, false @host = 'localhost' @port = process.port else @process = nil @stop_process = false @host = opts[:host] || 'localhost' @port = opts[:port] || 9292 end @closed = false @http = Net::HTTP.start @host, @port end |