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_hash.rb;h=c3b0dfdc657504d69aac68b192dfc93c90d6fcb8;hp=0460cf35b8d81d194539ba8cb48b820d15987027;hb=30caaa85aed7015ca0d77216bff175eebd917eb7;hpb=6f656bd4265e3dab13b9af2bf96e9044322e9d8f diff --git a/3rdparty/modules/stdlib/lib/puppet/parser/functions/validate_hash.rb b/3rdparty/modules/stdlib/lib/puppet/parser/functions/validate_hash.rb index 0460cf35b..c3b0dfdc6 100644 --- a/3rdparty/modules/stdlib/lib/puppet/parser/functions/validate_hash.rb +++ b/3rdparty/modules/stdlib/lib/puppet/parser/functions/validate_hash.rb @@ -2,23 +2,29 @@ # validate_hash.rb # module Puppet::Parser::Functions - newfunction(:validate_hash, :doc => <<-'DOC') do |args| - Validate that all passed values are hash data structures. Abort catalog - compilation if any value fails this check. + newfunction(:validate_hash, :doc => <<-DOC + @summary + Validate that all passed values are hash data structures. Abort catalog + compilation if any value fails this check. - The following values will pass: + @return + validate hash - $my_hash = { 'one' => 'two' } - validate_hash($my_hash) + @example **Usage** - The following values will fail, causing compilation to abort: + The following values will pass: - validate_hash(true) - validate_hash('some_string') - $undefined = undef - validate_hash($undefined) + $my_hash = { 'one' => 'two' } + validate_hash($my_hash) + The following values will fail, causing compilation to abort: + + validate_hash(true) + validate_hash('some_string') + $undefined = undef + validate_hash($undefined) DOC + ) do |args| function_deprecation([:validate_hash, 'This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Hash. There is further documentation for validate_legacy function in the README.'])