comparison modules/stdlib/lib/puppet/parser/functions/shuffle.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 adf6fe9bbc17
comparison
equal deleted inserted replaced
274:b2571c28fc27 275:d9352a684e62
1 # 1 #
2 # shuffle.rb 2 # shuffle.rb
3 # 3 #
4 module Puppet::Parser::Functions 4 module Puppet::Parser::Functions
5 newfunction(:shuffle, :type => :rvalue, :doc => <<-DOC 5 newfunction(:shuffle, :type => :rvalue, :doc => <<-DOC
6 @summary
6 Randomizes the order of a string or array elements. 7 Randomizes the order of a string or array elements.
8
9 @return
10 randomized string or array
7 DOC 11 DOC
8 ) do |arguments| 12 ) do |arguments|
9 13
10 raise(Puppet::ParseError, "shuffle(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.empty? 14 raise(Puppet::ParseError, "shuffle(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.empty?
11 15