Sha256: 80f64ee26f2ff66efb740c7d38d96fc33158aa62bf4e76ba392d8b0ebf85d292
Contents?: true
Size: 197 Bytes
Versions: 10
Compression:
Stored size: 197 Bytes
Contents
class Socket def self.ipaddress hostname = %x(hostname).chomp getaddrinfo(hostname, nil).first[3] end def self.fqdn Socket.gethostbyaddr(IPAddr.new(ipaddress).hton)[0] end end
Version data entries
10 entries across 10 versions & 1 rubygems