]> git.donarmstrong.com Git - dsa-puppet.git/blob - 3rdparty/modules/stdlib/lib/puppet/parser/functions/private.rb
upgrade to stdlib 4.6.1
[dsa-puppet.git] / 3rdparty / modules / stdlib / lib / puppet / parser / functions / private.rb
1 #
2 # private.rb
3 #
4
5 module Puppet::Parser::Functions
6   newfunction(:private, :doc => <<-'EOS'
7     DEPRECATED: Sets the current class or definition as private.
8     Calling the class or definition from outside the current module will fail.
9   EOS
10   ) do |args|
11     warning("private() DEPRECATED: This function will cease to function on Puppet 4; please use assert_private() before upgrading to puppet 4 for backwards-compatibility, or migrate to the new parser's typing system.")
12     if !Puppet::Parser::Functions.autoloader.loaded?(:assert_private)
13       Puppet::Parser::Functions.autoloader.load(:assert_private)
14     end
15     function_assert_private([(args[0] unless args.size < 1)])
16   end
17 end