Skip to content

jbussdieker/ruby-hosts_file

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HostsFile

Gem Version Build Status Code Climate Dependency Status

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"}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages