diff modules/stdlib/lib/puppet/parser/functions/values.rb @ 275:d9352a684e62

Mass update of modules to remove deprecation warnings
author IBBoard <dev@ibboard.co.uk>
date Sun, 26 Jan 2020 11:36:07 +0000
parents c42fb28cff86
children
line wrap: on
line diff
--- a/modules/stdlib/lib/puppet/parser/functions/values.rb	Sat Jan 04 11:42:45 2020 +0000
+++ b/modules/stdlib/lib/puppet/parser/functions/values.rb	Sun Jan 26 11:36:07 2020 +0000
@@ -3,21 +3,27 @@
 #
 module Puppet::Parser::Functions
   newfunction(:values, :type => :rvalue, :doc => <<-DOC
-    When given a hash this function will return the values of that hash.
+    @summary
+      When given a hash this function will return the values of that hash.
 
-    *Examples:*
+    @return
+      array of values
 
-        $hash = {
-          'a' => 1,
-          'b' => 2,
-          'c' => 3,
-        }
-        values($hash)
+    @example **Usage**
+      $hash = {
+        'a' => 1,
+        'b' => 2,
+        'c' => 3,
+      }
+      values($hash)
 
-    This example would return:
+      This example would return: ```[1,2,3]```
 
-        [1,2,3]
-    DOC
+    > *Note:*
+    From Puppet 5.5.0, the compatible function with the same name in Puppet core
+    will be used instead of this function.
+
+  DOC
              ) do |arguments|
 
     raise(Puppet::ParseError, "values(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.empty?