class TtlAuto::Ping
Public Class Methods
new(hash)
click to toggle source
# File lib/ttlauto/ping.rb, line 6 def initialize hash @host = hash[:server] @port = hash[:port] end
Public Instance Methods
scan?()
click to toggle source
# File lib/ttlauto/ping.rb, line 11 def scan? tcp = Net::Ping::TCP.new(@host, @port) tcp.ping? end