Sha256: 0022377c3c316983a0fdf26846e99e637df6f1bfd3042a18676dc43e02eb5aa9

Contents?: true

Size: 1.14 KB

Versions: 13

Compression:

Stored size: 1.14 KB

Contents

#############################################################################
# Copyright © 2010 Dan Wanek <dwanek@nd.gov>
#
#
# This file is part of zenoss_client.
# 
# zenoss_client is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as published
# by the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
# 
# zenoss_client is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
# Public License for more details.
# 
# You should have received a copy of the GNU General Public License along
# with zenoss_client.  If not, see <http://www.gnu.org/licenses/>.
#############################################################################
require 'ipaddr'

class IPAddr

  # This is an extension to the base IPAddr that adds the ability to convert
  # an IP Address from it's network form to a string in the standard dotted
  # decimal format
  def self.inet_ntoa(addr)
    [addr].pack("N").unpack("C*").join "."
  end
end


Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
zenoss_client-0.10.1 lib/ext/ipaddr.rb
zenoss_client-0.10.0 lib/ext/ipaddr.rb
zenoss_client-0.9.1 lib/ext/ipaddr.rb
zenoss_client-0.9.0 lib/ext/ipaddr.rb
zenoss_client-0.8.0 lib/ext/ipaddr.rb
zenoss_client-0.7.0 lib/ext/ipaddr.rb
zenoss_client-0.6.1 lib/ext/ipaddr.rb
zenoss_client-0.6.0 lib/ext/ipaddr.rb
zenoss_client-0.5.4 lib/ext/ipaddr.rb
zenoss_client-0.5.3 lib/ext/ipaddr.rb
zenoss_client-0.5.2 lib/ext/ipaddr.rb
zenoss_client-0.5.1 lib/ext/ipaddr.rb
zenoss_client-0.5.0 lib/ext/ipaddr.rb