X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fdsa-puppet.git;a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Flib%2Fpuppet%2Fparser%2Ffunctions%2Fnum2bool.rb;h=6e530db9ae9522201759ec935313d1138c2e4388;hp=5e0f494245eb14d827e79ed733f8b7a4d6001c00;hb=30caaa85aed7015ca0d77216bff175eebd917eb7;hpb=6f656bd4265e3dab13b9af2bf96e9044322e9d8f diff --git a/3rdparty/modules/stdlib/lib/puppet/parser/functions/num2bool.rb b/3rdparty/modules/stdlib/lib/puppet/parser/functions/num2bool.rb index 5e0f49424..6e530db9a 100644 --- a/3rdparty/modules/stdlib/lib/puppet/parser/functions/num2bool.rb +++ b/3rdparty/modules/stdlib/lib/puppet/parser/functions/num2bool.rb @@ -3,15 +3,16 @@ # module Puppet::Parser::Functions newfunction(:num2bool, :type => :rvalue, :doc => <<-DOC - This function converts a number or a string representation of a number into a - true boolean. Zero or anything non-numeric becomes false. Numbers higher then 0 - become true. + @summary + This function converts a number or a string representation of a number into a + true boolean. - Note that since Puppet 5.0.0 the same can be achieved with the Puppet Type System. + > *Note:* that since Puppet 5.0.0 the same can be achieved with the Puppet Type System. See the new() function in Puppet for the many available type conversions. - Boolean(0) # false - Boolean(1) # true + @return [Boolean] + Boolean(0) # false for any zero or negative number + Boolean(1) # true for any positive number DOC ) do |arguments|