X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Flib%2Fpuppet%2Fparser%2Ffunctions%2Fshuffle.rb;h=3e10739a5ca6b10008385b1b99b8ad34996ffea7;hb=30caaa85aed7015ca0d77216bff175eebd917eb7;hp=942cbceab86bd5230a2f9fd0c8aa68313280ed9a;hpb=6963202b4b62c2816655ac9532521b018fdf83bd;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/stdlib/lib/puppet/parser/functions/shuffle.rb b/3rdparty/modules/stdlib/lib/puppet/parser/functions/shuffle.rb index 942cbceab..3e10739a5 100644 --- a/3rdparty/modules/stdlib/lib/puppet/parser/functions/shuffle.rb +++ b/3rdparty/modules/stdlib/lib/puppet/parser/functions/shuffle.rb @@ -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]