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%2Fvalues.rb;h=434ce6c91e43a19ded89c79ca281577358376931;hp=91a0cb9adc5a93d13dea5b48305bd13d4d0a828a;hb=30caaa85aed7015ca0d77216bff175eebd917eb7;hpb=6f656bd4265e3dab13b9af2bf96e9044322e9d8f diff --git a/3rdparty/modules/stdlib/lib/puppet/parser/functions/values.rb b/3rdparty/modules/stdlib/lib/puppet/parser/functions/values.rb index 91a0cb9ad..434ce6c91 100644 --- a/3rdparty/modules/stdlib/lib/puppet/parser/functions/values.rb +++ b/3rdparty/modules/stdlib/lib/puppet/parser/functions/values.rb @@ -3,24 +3,27 @@ # module Puppet::Parser::Functions newfunction(:values, :type => :rvalue, :doc => <<-DOC - When given a hash this function will return the values of that hash. + @summary + When given a hash this function will return the values of that hash. - *Examples:* + @return + array of values - $hash = { - 'a' => 1, - 'b' => 2, - 'c' => 3, - } - values($hash) + @example **Usage** + $hash = { + 'a' => 1, + 'b' => 2, + 'c' => 3, + } + values($hash) - This example would return: + This example would return: ```[1,2,3]``` - [1,2,3] - - Note: from Puppet 5.5.0, the compatible function with the same name in Puppet core + > *Note:* + From Puppet 5.5.0, the compatible function with the same name in Puppet core will be used instead of this function. - DOC + + DOC ) do |arguments| raise(Puppet::ParseError, "values(): Wrong number of arguments given (#{arguments.size} for 1)") if arguments.empty?