Sha256: 02d685f129526cc757a66303c093c4a59e6834670f5352b98af76ea2913fb501

Contents?: true

Size: 272 Bytes

Versions: 10

Compression:

Stored size: 272 Bytes

Contents

require "ipaddr"

module Vagrant
  module Util
    module NetworkIP
      # Returns the network address of the given IP and subnet.
      #
      # @return [String]
      def network_address(ip, subnet)
        IPAddr.new(ip).mask(subnet).to_s
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
vagrant-unbundled-2.2.9.0 lib/vagrant/util/network_ip.rb
vagrant-unbundled-2.2.8.0 lib/vagrant/util/network_ip.rb
vagrant-unbundled-2.2.7.0 lib/vagrant/util/network_ip.rb
vagrant-unbundled-2.2.6.2 lib/vagrant/util/network_ip.rb
vagrant-unbundled-2.2.6.1 lib/vagrant/util/network_ip.rb
vagrant-unbundled-2.2.6.0 lib/vagrant/util/network_ip.rb
vagrant-unbundled-2.2.5.0 lib/vagrant/util/network_ip.rb
vagrant-unbundled-2.2.4.0 lib/vagrant/util/network_ip.rb
vagrant-unbundled-2.2.3.0 lib/vagrant/util/network_ip.rb
vagrant-unbundled-2.2.2.0 lib/vagrant/util/network_ip.rb