# File lib/net/ping/ping.rb, line 57 def initialize(host=nil, port=nil, timeout=5) @host = host @port = port || Socket.getservbyname('echo') || 7 @timeout = timeout @exception = nil @warning = nil @duration = nil yield self if block_given? end