lib/linux_admin/network_interface/network_interface_rh.rb
def validate_ip(ip)
      IPAddr.new(ip)
    rescue ArgumentError
      raise ArgumentError, "#{ip} is not a valid IPv4 or IPv6 address"
    end
# Validate that the given address is formatted correctly
#
# @param ip [String]
# @raise ArgumentError if the address is not correctly formatted
Validate that the given address is formatted correctly
Validate that the given address is formatted correctly
def validate_ip(ip)
      IPAddr.new(ip)
    rescue ArgumentError
      raise ArgumentError, "#{ip} is not a valid IPv4 or IPv6 address"
    end
def validate_ip ( ip ) IPAddr . new ( ip ) rescue ArgumentError raise ArgumentError , "#{ip} is not a valid IPv4 or IPv6 address" end
Validate that the given address is formatted correctly
Validate that the given address is formatted correctly
ArgumentError if the address is not correctly formatted
ArgumentError if the address is not correctly formatted
ip
None