Class: Capybara::Webkit::Server
- Inherits:
-
Object
- Object
- Capybara::Webkit::Server
- Defined in:
- lib/capybara/webkit/server.rb
Constant Summary collapse
- SERVER_PATH =
File.("../../../../bin/webkit_server", __FILE__)
- WEBKIT_SERVER_START_TIMEOUT =
15
Instance Attribute Summary collapse
-
#pid ⇒ Object
readonly
Returns the value of attribute pid.
-
#port ⇒ Object
readonly
Returns the value of attribute port.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Server
constructor
A new instance of Server.
- #start ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Server
Returns a new instance of Server.
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/capybara/webkit/server.rb', line 12 def initialize( = {}) if .has_key?(:stderr) @output_target = [:stderr] elsif .has_key?(:stdout) warn "[DEPRECATION] The Capybara::Webkit::Connection `stdout` " \ "option is deprecated. Please use `stderr` instead." @output_target = [:stdout] else @output_target = $stderr end end |
Instance Attribute Details
#pid ⇒ Object (readonly)
Returns the value of attribute pid.
10 11 12 |
# File 'lib/capybara/webkit/server.rb', line 10 def pid @pid end |
#port ⇒ Object (readonly)
Returns the value of attribute port.
10 11 12 |
# File 'lib/capybara/webkit/server.rb', line 10 def port @port end |
Instance Method Details
#start ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/capybara/webkit/server.rb', line 24 def start open_pipe discover_port discover_pid forward_output_in_background_thread register_shutdown_hook end |