Sha256: 0f783b29afe29ba66f2734986bf4b9ef44aea8a22f88d9ea0968e5fc2f3159b3

Contents?: true

Size: 753 Bytes

Versions: 1

Compression:

Stored size: 753 Bytes

Contents

# Net::IP

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

Tools for working with IP routes

## Usage

````ruby
require 'net/ip'

Net::IP::Route.flush(:cache)

Net::IP::Route.each do |route|
  puts route
end

Net::IP::Route.find_gateways("eth0").each do |gateway|
  puts gateway.via
end

gws = ["192.168.0.1", "192.168.0.2"].collect do |ip|
  Net::IP::Route.new(:via => ip, :dev => "eth0", :weight => 1)
end

Net::IP::Route.update_gateways(gws)
````

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
net-ip-0.0.4 README.md