comparison modules/stdlib/lib/puppet/parser/functions/lstrip.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 # lstrip.rb 2 # lstrip.rb
3 # 3 #
4 module Puppet::Parser::Functions 4 module Puppet::Parser::Functions
5 newfunction(:lstrip, :type => :rvalue, :doc => <<-DOC 5 newfunction(:lstrip, :type => :rvalue, :doc => <<-DOC
6 Strips leading spaces to the left of a string. 6 @summary
7 **Deprecated:** Strips leading spaces to the left of a string.
8
9 @return [String]
10 The stripped string
11
12 > **Note:** **Deprecated** from Puppet 6.0.0, this function has been replaced with a
13 built-in [`max`](https://puppet.com/docs/puppet/latest/function.html#max) function.
7 DOC 14 DOC
8 ) do |arguments| 15 ) do |arguments|
9 16
10 raise(Puppet::ParseError, "lstrip(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.empty? 17 raise(Puppet::ParseError, "lstrip(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.empty?
11 18