Update stdlib and concat to 6.1.0 both
[mirror/dsa-puppet.git] / 3rdparty / modules / stdlib / lib / puppet / parser / functions / type.rb
1 #
2 # type.rb
3 #
4 module Puppet::Parser::Functions
5   newfunction(:type, :type => :rvalue, :doc => <<-DOC
6     @summary
7       **DEPRECATED:** This function will cease to function on Puppet 4;
8      please use type3x() before upgrading to Puppet 4 for backwards-compatibility, or migrate to the new parser's typing system.
9
10     @return the type when passed a value. Type can be one of:
11
12     * string
13     * array
14     * hash
15     * float
16     * integer
17     * boolean
18   DOC
19              ) do |args|
20
21     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
22     unless Puppet::Parser::Functions.autoloader.loaded?(:type3x)
23       Puppet::Parser::Functions.autoloader.load(:type3x)
24     end
25     function_type3x(args)
26   end
27 end
28
29 # vim: set ts=2 sw=2 et :