5 module Puppet::Parser::Functions
6 newfunction(:is_ip_address, :type => :rvalue, :doc => <<-EOS
7 Returns true if the string passed to this function is a valid IP address.
13 if (arguments.size != 1) then
14 raise(Puppet::ParseError, "is_ip_address(): Wrong number of arguments "+
15 "given #{arguments.size} for 1")
19 ip = IPAddr.new(arguments[0])
24 if ip.ipv4? or ip.ipv6? then
32 # vim: set ts=2 sw=2 et :