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%2Fflatten.rb;h=7344201fdf6b92083d69be7eb67a127b1f4a633b;hp=6be5962b26f823e289b369c5fb55564bd8211222;hb=30caaa85aed7015ca0d77216bff175eebd917eb7;hpb=6f656bd4265e3dab13b9af2bf96e9044322e9d8f diff --git a/3rdparty/modules/stdlib/lib/puppet/parser/functions/flatten.rb b/3rdparty/modules/stdlib/lib/puppet/parser/functions/flatten.rb index 6be5962b2..7344201fd 100644 --- a/3rdparty/modules/stdlib/lib/puppet/parser/functions/flatten.rb +++ b/3rdparty/modules/stdlib/lib/puppet/parser/functions/flatten.rb @@ -3,17 +3,19 @@ # module Puppet::Parser::Functions newfunction(:flatten, :type => :rvalue, :doc => <<-DOC - This function flattens any deeply nested arrays and returns a single flat array - as a result. + @summary + This function flattens any deeply nested arrays and returns a single flat array + as a result. - *Examples:* + @return + convert nested arrays into a single flat array - flatten(['a', ['b', ['c']]]) + @example Example usage - Would return: ['a','b','c'] + flatten(['a', ['b', ['c']]])` returns: `['a','b','c'] - Note: from Puppet 5.5.0, the compatible function with the same name in Puppet core - will be used instead of this function. + > **Note:** **Deprecated** from Puppet 5.5.0, this function has been replaced with a + built-in [`flatten`](https://puppet.com/docs/puppet/latest/function.html#flatten) function. DOC ) do |arguments|