Class: FastestServer::WindowsPing

Inherits:
Ping
  • Object
show all
Defined in:
lib/fastest_server/ping.rb

Constant Summary collapse

REGEX_PING =
/Pinging.*/
REGEX_FILTER =
/\[|\]/
REGEX_LOSS =
/\(\d*% loss\)/
REGEX_STAT =
/Minimum = (?<min>\d+)ms, Maximum = (?<max>\d+)ms, Average = (?<avg>\d+)ms(?<stddev>)/

Instance Method Summary collapse

Methods inherited from Ping

get_count, #initialize, #method_missing, #parsed, perform, #perform, set_count

Constructor Details

This class inherits a constructor from FastestServer::Ping

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class FastestServer::Ping

Instance Method Details

#execute_ping_commandObject



86
87
88
89
90
# File 'lib/fastest_server/ping.rb', line 86

def execute_ping_command
  result = `chcp 437 && ping -n #{Ping.get_count} #@server`
  status = $?
  [result, $?]
end