HostsFile
Basic library for reading hosts file entries.
Usage
require 'hosts_file'
hosts = HostsFile.load("/etc/hosts")
hosts.collect {|host| host.ip}
hosts.collect {|host| host.name}
hosts.collect {|host| host.aliases}
hosts.find {|host| host.hostname == "somehost"}
hosts.find {|host| host.ip == "1.1.1.1"}