5 module Puppet::Parser::Functions
6 newfunction(:is_float, :type => :rvalue, :doc => <<-EOS
7 Returns true if the variable passed to this function is a float.
11 if (arguments.size != 1) then
12 raise(Puppet::ParseError, "is_float(): Wrong number of arguments "+
13 "given #{arguments.size} for 1")
18 # Only allow Numeric or String types
19 return false unless value.is_a?(Numeric) or value.is_a?(String)
21 if value != value.to_f.to_s and !value.is_a? Float then
30 # vim: set ts=2 sw=2 et :