Update stdlib and concat to 6.1.0 both
[mirror/dsa-puppet.git] / 3rdparty / modules / stdlib / lib / puppet / parser / functions / flatten.rb
index 4401bdb..7344201 100644 (file)
@@ -1,19 +1,23 @@
 #
 # flatten.rb
 #
-
 module Puppet::Parser::Functions
-  newfunction(:flatten, :type => :rvalue, :doc => <<-EOS
-This function flattens any deeply nested arrays and returns a single flat array
-as a result.
+  newfunction(:flatten, :type => :rvalue, :doc => <<-DOC
+    @summary
+      This function flattens any deeply nested arrays and returns a single flat array
+      as a result.
+
+    @return
+      convert nested arrays into a single flat array
 
-*Examples:*
+    @example Example usage
 
-    flatten(['a', ['b', ['c']]])
+      flatten(['a', ['b', ['c']]])` returns: `['a','b','c']
 
-Would return: ['a','b','c']
-    EOS
-  ) do |arguments|
+    > **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|
 
     raise(Puppet::ParseError, "flatten(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size != 1