Sha256: 9ae364bc863c5666edc27eb49d2ba928b282606e3368ecb99b18a371edd46e18
Contents?: true
Size: 250 Bytes
Versions: 12
Compression:
Stored size: 250 Bytes
Contents
module Specjour module SocketHelpers def ip_from_hostname(hostname) Socket.getaddrinfo(hostname, nil, Socket::AF_INET, Socket::SOCK_STREAM).first.fetch(3) end def hostname @hostname ||= Socket.gethostname end end end
Version data entries
12 entries across 12 versions & 3 rubygems