Update stdlib and concat to 6.1.0 both
[mirror/dsa-puppet.git] / 3rdparty / modules / stdlib / lib / puppet / parser / functions / shuffle.rb
index 942cbce..3e10739 100644 (file)
@@ -1,14 +1,17 @@
 #
 # shuffle.rb
 #
-
 module Puppet::Parser::Functions
-  newfunction(:shuffle, :type => :rvalue, :doc => <<-EOS
-Randomizes the order of a string or array elements.
-    EOS
-  ) do |arguments|
+  newfunction(:shuffle, :type => :rvalue, :doc => <<-DOC
+  @summary
+    Randomizes the order of a string or array elements.
+
+   @return
+     randomized string or array
+  DOC
+             ) do |arguments|
 
-    raise(Puppet::ParseError, "shuffle(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.size < 1
+    raise(Puppet::ParseError, "shuffle(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.empty?
 
     value = arguments[0]