comparison modules/stdlib/lib/puppet/parser/functions/seeded_rand.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 4a2ee7e3b110
comparison
equal deleted inserted replaced
274:b2571c28fc27 275:d9352a684e62
4 Puppet::Parser::Functions.newfunction( 4 Puppet::Parser::Functions.newfunction(
5 :seeded_rand, 5 :seeded_rand,
6 :arity => 2, 6 :arity => 2,
7 :type => :rvalue, 7 :type => :rvalue,
8 :doc => <<-DOC 8 :doc => <<-DOC
9 Usage: `seeded_rand(MAX, SEED)`. MAX must be a positive integer; SEED is any string. 9 @summary
10 Generates a random whole number greater than or equal to 0 and less than MAX, using the value of SEED for repeatable randomness.
11
12 @return
13 random number greater than or equal to 0 and less than MAX
14
15 @example **Usage:**
16 seeded_rand(MAX, SEED).
17 MAX must be a positive integer; SEED is any string.
10 18
11 Generates a random whole number greater than or equal to 0 and less 19 Generates a random whole number greater than or equal to 0 and less
12 than MAX, using the value of SEED for repeatable randomness. If SEED 20 than MAX, using the value of SEED for repeatable randomness. If SEED
13 starts with "$fqdn:", this is behaves the same as `fqdn_rand`. 21 starts with "$fqdn:", this is behaves the same as `fqdn_rand`.
14 DOC 22 DOC