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%2Fsuffix.rb;h=643d7223abca10bd8a3c9a31c90e6ac1bf369cbf;hp=72ff08dd7b2d714b1998f5579157781cd533da3f;hb=30caaa85aed7015ca0d77216bff175eebd917eb7;hpb=6f656bd4265e3dab13b9af2bf96e9044322e9d8f diff --git a/3rdparty/modules/stdlib/lib/puppet/parser/functions/suffix.rb b/3rdparty/modules/stdlib/lib/puppet/parser/functions/suffix.rb index 72ff08dd7..643d7223a 100644 --- a/3rdparty/modules/stdlib/lib/puppet/parser/functions/suffix.rb +++ b/3rdparty/modules/stdlib/lib/puppet/parser/functions/suffix.rb @@ -3,19 +3,22 @@ # module Puppet::Parser::Functions newfunction(:suffix, :type => :rvalue, :doc => <<-DOC - This function applies a suffix to all elements in an array, or to the keys - in a hash. + @summary + This function applies a suffix to all elements in an array, or to the keys + in a hash. - *Examples:* + @return + Array or Hash with updated elements containing the passed suffix - suffix(['a','b','c'], 'p') + @example **Usage** - Will return: ['ap','bp','cp'] + suffix(['a','b','c'], 'p') + Will return: ['ap','bp','cp'] - Note that since Puppet 4.0.0 the general way to modify values is in array is by using the map + > *Note:* that since Puppet 4.0.0 the general way to modify values is in array is by using the map function in Puppet. This example does the same as the example above: - ['a', 'b', 'c'].map |$x| { "${x}p" } + ```['a', 'b', 'c'].map |$x| { "${x}p" }``` DOC ) do |arguments|