addresses = []
interfaces(options).each do |interface|
+ address = interface[:public_address] || interface[:address]
+
+ next if address.nil?
+
if block.nil?
- addresses << interface[:address]
+ addresses << address
else
- block.call(interface[:address])
+ yield address
end
end