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%2Freject.rb;h=6342db6e49b75127eb6a0acc2faf4665024083cc;hp=392f62eb90b6377123447c95fc546edaf8b67eff;hb=30caaa85aed7015ca0d77216bff175eebd917eb7;hpb=6f656bd4265e3dab13b9af2bf96e9044322e9d8f diff --git a/3rdparty/modules/stdlib/lib/puppet/parser/functions/reject.rb b/3rdparty/modules/stdlib/lib/puppet/parser/functions/reject.rb index 392f62eb9..6342db6e4 100644 --- a/3rdparty/modules/stdlib/lib/puppet/parser/functions/reject.rb +++ b/3rdparty/modules/stdlib/lib/puppet/parser/functions/reject.rb @@ -3,21 +3,22 @@ # module Puppet::Parser::Functions newfunction(:reject, :type => :rvalue, :doc => <<-DOC) do |args| - This function searches through an array and rejects all elements that match - the provided regular expression. + @summary + This function searches through an array and rejects all elements that match + the provided regular expression. - *Examples:* + @return + an array containing all the elements which doesn'' match the provided regular expression - reject(['aaa','bbb','ccc','aaaddd'], 'aaa') + @example **Usage** - Would return: + reject(['aaa','bbb','ccc','aaaddd'], 'aaa') - ['bbb','ccc'] + Would return: ['bbb','ccc'] - Note that since Puppet 4.0.0 the same is in general done with the filter function. Here is the - equivalence of the reject() function: - - ['aaa','bbb','ccc','aaaddd'].filter |$x| { $x !~ /aaa/ } + > *Note:* + Since Puppet 4.0.0 the same is in general done with the filter function. Here is the equivalence of the reject() function: + ['aaa','bbb','ccc','aaaddd'].filter |$x| { $x !~ /aaa/ } DOC if args.size != 2