X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Flib%2Fpuppet%2Fparser%2Ffunctions%2Fassert_private.rb;h=4f1a5e26c481c6737f3b009b9c4e77f91f81d496;hb=30caaa85aed7015ca0d77216bff175eebd917eb7;hp=62e2c6b088a65e990fe17c333588d499e403575b;hpb=6963202b4b62c2816655ac9532521b018fdf83bd;p=mirror%2Fdsa-puppet.git diff --git a/3rdparty/modules/stdlib/lib/puppet/parser/functions/assert_private.rb b/3rdparty/modules/stdlib/lib/puppet/parser/functions/assert_private.rb index 62e2c6b08..4f1a5e26c 100644 --- a/3rdparty/modules/stdlib/lib/puppet/parser/functions/assert_private.rb +++ b/3rdparty/modules/stdlib/lib/puppet/parser/functions/assert_private.rb @@ -1,20 +1,24 @@ # # assert_private.rb # - module Puppet::Parser::Functions - newfunction(:assert_private, :doc => <<-'EOS' - Sets the current class or definition as private. + newfunction(:assert_private, :doc => <<-DOC + @summary + Sets the current class or definition as private. + + @return + set the current class or definition as private. + Calling the class or definition from outside the current module will fail. - EOS - ) do |args| + DOC + ) do |args| raise(Puppet::ParseError, "assert_private(): Wrong number of arguments given (#{args.size}}) for 0 or 1)") if args.size > 1 scope = self if scope.lookupvar('module_name') != scope.lookupvar('caller_module_name') message = nil - if args[0] and args[0].is_a? String + if args[0] && args[0].is_a?(String) message = args[0] else manifest_name = scope.source.name