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%2Funique.rb;h=c9eaa08ef7967b563b5d55113dc62400f5520962;hp=301f6a410d444351222cd49caf4e4da3c6fe0e32;hb=30caaa85aed7015ca0d77216bff175eebd917eb7;hpb=6f656bd4265e3dab13b9af2bf96e9044322e9d8f diff --git a/3rdparty/modules/stdlib/lib/puppet/parser/functions/unique.rb b/3rdparty/modules/stdlib/lib/puppet/parser/functions/unique.rb index 301f6a410..c9eaa08ef 100644 --- a/3rdparty/modules/stdlib/lib/puppet/parser/functions/unique.rb +++ b/3rdparty/modules/stdlib/lib/puppet/parser/functions/unique.rb @@ -3,23 +3,22 @@ # module Puppet::Parser::Functions newfunction(:unique, :type => :rvalue, :doc => <<-DOC - This function will remove duplicates from strings and arrays. + @summary + This function will remove duplicates from strings and arrays. - *Examples:* + @return + String or array with duplicates removed - unique("aabbcc") + @example **Usage** - Will return: + unique("aabbcc") + Will return: abc - abc + You can also use this with arrays: - You can also use this with arrays: + unique(["a","a","b","b","c","c"]) + This returns: ["a","b","c"] - unique(["a","a","b","b","c","c"]) - - This returns: - - ["a","b","c"] DOC ) do |arguments|