Files
Allan Eising e0ff5ca760 First commit
2015-10-27 21:15:36 +01:00

11 lines
271 B
Ruby

class Hastighedstest < Sinatra::Base
# Pings a remote host with one packet
#
# @param remote [String] The host to ping
# @return true or false
def ping(remote)
result = system("ping -c 1 -W 1 #{remote} > /dev/null")
result
end
end