X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fdsa-puppet.git;a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Flib%2Fpuppet%2Fparser%2Ffunctions%2Fvalidate_array.rb;h=d24f75e48863e5ddd775c3fa7c3f859fb31ed771;hp=1120ce8bb3599f87b7a7e3d573518f33d91e35ec;hb=30caaa85aed7015ca0d77216bff175eebd917eb7;hpb=6f656bd4265e3dab13b9af2bf96e9044322e9d8f diff --git a/3rdparty/modules/stdlib/lib/puppet/parser/functions/validate_array.rb b/3rdparty/modules/stdlib/lib/puppet/parser/functions/validate_array.rb index 1120ce8bb..d24f75e48 100644 --- a/3rdparty/modules/stdlib/lib/puppet/parser/functions/validate_array.rb +++ b/3rdparty/modules/stdlib/lib/puppet/parser/functions/validate_array.rb @@ -2,23 +2,27 @@ # validate_array.rb # module Puppet::Parser::Functions - newfunction(:validate_array, :doc => <<-'DOC') do |args| - Validate that all passed values are array data structures. Abort catalog - compilation if any value fails this check. + newfunction(:validate_array, :doc => <<-DOC) do |args| + @summary + Validate that all passed values are array data structures. Abort catalog + compilation if any value fails this check. - The following values will pass: + @return + validate array - $my_array = [ 'one', 'two' ] - validate_array($my_array) + @example **Usage** + The following values will pass: - The following values will fail, causing compilation to abort: + $my_array = [ 'one', 'two' ] + validate_array($my_array) - validate_array(true) - validate_array('some_string') - $undefined = undef - validate_array($undefined) + The following values will fail, causing compilation to abort: - DOC + validate_array(true) + validate_array('some_string') + $undefined = undef + validate_array($undefined) + DOC function_deprecation([:validate_array, 'This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Array. There is further documentation for validate_legacy function in the README.'])