X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Flib%2Fpuppet%2Fparser%2Ffunctions%2Ftype.rb;h=6b0140827928a976be0491ad8c949a918a65b762;hb=30caaa85aed7015ca0d77216bff175eebd917eb7;hp=016529b03c7f35a3dbda00f1bb6dca15e37002aa;hpb=ad88f67c13ae0f1a08936dad643f1e3509ab5f40;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/stdlib/lib/puppet/parser/functions/type.rb b/3rdparty/modules/stdlib/lib/puppet/parser/functions/type.rb index 016529b03..6b0140827 100644 --- a/3rdparty/modules/stdlib/lib/puppet/parser/functions/type.rb +++ b/3rdparty/modules/stdlib/lib/puppet/parser/functions/type.rb @@ -1,18 +1,28 @@ # # type.rb # - module Puppet::Parser::Functions - newfunction(:type, :type => :rvalue, :doc => <<-EOS - DEPRECATED: This function will cease to function on Puppet 4; please use type3x() before upgrading to puppet 4 for backwards-compatibility, or migrate to the new parser's typing system. - EOS - ) do |args| + newfunction(:type, :type => :rvalue, :doc => <<-DOC + @summary + **DEPRECATED:** This function will cease to function on Puppet 4; + please use type3x() before upgrading to Puppet 4 for backwards-compatibility, or migrate to the new parser's typing system. + + @return the type when passed a value. Type can be one of: + + * string + * array + * hash + * float + * integer + * boolean + DOC + ) do |args| - warning("type() DEPRECATED: This function will cease to function on Puppet 4; please use type3x() before upgrading to puppet 4 for backwards-compatibility, or migrate to the new parser's typing system.") - if ! Puppet::Parser::Functions.autoloader.loaded?(:type3x) + warning("type() DEPRECATED: This function will cease to function on Puppet 4; please use type3x() before upgrading to puppet 4 for backwards-compatibility, or migrate to the new parser's typing system.") # rubocop:disable Metrics/LineLength : Cannot reduce line length + unless Puppet::Parser::Functions.autoloader.loaded?(:type3x) Puppet::Parser::Functions.autoloader.load(:type3x) end - function_type3x(args + [false]) + function_type3x(args) end end