A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://rubydoc.info/github/teamcapybara/capybara/master/Capybara/Server/Checker below:

Checker – Documentation for teamcapybara/capybara (master) – RubyDoc.info

Class: Capybara::Server::Checker Private
Inherits:
Object show all
Defined in:
lib/capybara/server/checker.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Constant Summary collapse
TRY_HTTPS_ERRORS =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

[EOFError, Net::ReadTimeout, Errno::ECONNRESET].freeze
Instance Method Summary collapse Constructor Details #initialize(host, port) ⇒ Checker

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Checker.

8
9
10
11
# File 'lib/capybara/server/checker.rb', line 8

def initialize(host, port)
  @host, @port = host, port
  @ssl = false
end
Instance Method Details #request(&block) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

13
14
15
16
17
18
19
# File 'lib/capybara/server/checker.rb', line 13

def request(&block)
  ssl? ? https_request(&block) : http_request(&block)
rescue *TRY_HTTPS_ERRORS
  res = https_request(&block)
  @ssl = true
  res
end
#ssl? ⇒ Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

21
22
23
# File 'lib/capybara/server/checker.rb', line 21

def ssl?
  @ssl
end

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4