Module: VCR::InternetConnection

Extended by:
InternetConnection
Included in:
InternetConnection
Defined in:
lib/vcr/util/internet_connection.rb

Constant Summary collapse

EXAMPLE_HOST =
"example.com"

Instance Method Summary collapse

Instance Method Details

#available?Boolean

Returns:

  • (Boolean)

31
32
33
34
# File 'lib/vcr/util/internet_connection.rb', line 31

def available?
  @available = VCR::Ping.pingecho(EXAMPLE_HOST, 1, 80) unless defined?(@available)
  @available
end