Flowdock
method

foreach

Importance_1
v1_9_3_125 - Show latest stable - 0 notes - Class: Addrinfo
foreach(nodename, service, family=nil, socktype=nil, protocol=nil, flags=nil, &block) public

iterates over the list of Addrinfo objects obtained by Addrinfo.getaddrinfo.

Addrinfo.foreach(nil, 80) {|x| p x }
#=> #<Addrinfo: 127.0.0.1:80 TCP (:80)>
#   #<Addrinfo: 127.0.0.1:80 UDP (:80)>
#   #<Addrinfo: [::1]:80 TCP (:80)>
#   #<Addrinfo: [::1]:80 UDP (:80)>
Show source
Register or log in to add new notes.