Sha256: 59ba1912f99d7e5fadaf3dc6eae75c3ca650eaae722570bc3032f71b692e8a03

Contents?: true

Size: 721 Bytes

Versions: 2

Compression:

Stored size: 721 Bytes

Contents

# HostsFile

[![Build Status](https://travis-ci.org/jbussdieker/ruby-hosts_file.png?branch=master)](https://travis-ci.org/jbussdieker/ruby-hosts_file)
[![Code Climate](https://codeclimate.com/github/jbussdieker/ruby-hosts_file.png)](https://codeclimate.com/github/jbussdieker/ruby-hosts_file)
[![Gem Version](https://badge.fury.io/rb/hosts_file.png)](http://badge.fury.io/rb/hosts_file)

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hosts_file-1.0.3 README.md
hosts_file-0.0.2 README.md