lib/odania.rb in odania-0.0.7 vs lib/odania.rb in odania-0.0.8

- old
+ new

@@ -29,6 +29,14 @@ config.url = consul_url end @configured = true end end + + def self.ips + ips = [] + Socket.ip_address_list.each do |address| + ip = address.ip_address + ips << ip unless %w(127.0.0.1 ::1).include? ip + end + end end