comparison modules/stdlib/lib/puppet/parser/functions/min.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
comparison
equal deleted inserted replaced
274:b2571c28fc27 275:d9352a684e62
1 # 1 #
2 # min.rb 2 # min.rb
3 # 3 #
4 module Puppet::Parser::Functions 4 module Puppet::Parser::Functions
5 newfunction(:min, :type => :rvalue, :doc => <<-DOC 5 newfunction(:min, :type => :rvalue, :doc => <<-DOC
6 Returns the lowest value of all arguments. 6 @summary
7 **Deprecated:** Returns the lowest value of all arguments.
8
7 Requires at least one argument. 9 Requires at least one argument.
10
11 @return
12 The lowest value among the given arguments
13
14 > **Note:** **Deprecated** from Puppet 6.0.0, this function has been replaced with a
15 built-in [`min`](https://puppet.com/docs/puppet/latest/function.html#min) function.
8 DOC 16 DOC
9 ) do |args| 17 ) do |args|
10 18
11 raise(Puppet::ParseError, 'min(): Wrong number of arguments need at least one') if args.empty? 19 raise(Puppet::ParseError, 'min(): Wrong number of arguments need at least one') if args.empty?
12 20