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%2Fdefined_with_params.rb;h=cc2b90a43572eadc098d57740e0897654d9ce009;hp=fb0cd8c0769e70126bab4f4d3e5be377e4a225a2;hb=30caaa85aed7015ca0d77216bff175eebd917eb7;hpb=6f656bd4265e3dab13b9af2bf96e9044322e9d8f diff --git a/3rdparty/modules/stdlib/lib/puppet/parser/functions/defined_with_params.rb b/3rdparty/modules/stdlib/lib/puppet/parser/functions/defined_with_params.rb index fb0cd8c07..cc2b90a43 100644 --- a/3rdparty/modules/stdlib/lib/puppet/parser/functions/defined_with_params.rb +++ b/3rdparty/modules/stdlib/lib/puppet/parser/functions/defined_with_params.rb @@ -3,19 +3,25 @@ require 'puppet/parser/functions' Puppet::Parser::Functions.newfunction(:defined_with_params, :type => :rvalue, - :doc => <<-'DOC' - Takes a resource reference and an optional hash of attributes. + :doc => <<-DOC + @summary + Takes a resource reference and an optional hash of attributes. - Returns true if a resource with the specified attributes has already been added - to the catalog, and false otherwise. + Returns `true` if a resource with the specified attributes has already been added + to the catalog, and `false` otherwise. - user { 'dan': - ensure => present, - } + ``` + user { 'dan': + ensure => present, + } - if ! defined_with_params(User[dan], {'ensure' => 'present' }) { - user { 'dan': ensure => present, } - } + if ! defined_with_params(User[dan], {'ensure' => 'present' }) { + user { 'dan': ensure => present, } + } + ``` + + @return [Boolean] + returns `true` or `false` DOC ) do |vals| reference, params = vals