def ping_class
      return Net::Ping::External unless ports
      return Net::Ping::TCP unless @protocol =~ /tcp|udp|http|wmi/
      Net::Ping.const_get(@protocol.upcase)
    end
def ping_class
      return Net::Ping::External unless ports
      return Net::Ping::TCP unless @protocol =~ /tcp|udp|http|wmi/
      Net::Ping.const_get(@protocol.upcase)
    end
Decide how to ping