We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef19ca3 commit 8abe016Copy full SHA for 8abe016
lib/puppet/functions/stdlib/nested_values.rb
@@ -12,15 +12,15 @@
12
# $data = $hash.stdlib::nested_values
13
# #Output : ["value1", "value2.1", "value3"]
14
Puppet::Functions.create_function(:'stdlib::nested_values') do
15
- # @param options A (nested) hash
+ # @param hash A (nested) hash
16
# @return All the values found in the input hash included those deeply nested.
17
dispatch :nested_values do
18
- param 'Hash', :options
+ param 'Hash', :hash
19
return_type 'Array'
20
end
21
22
- def nested_values(options)
23
- options.each_with_object([]) do |(_k, v), values|
+ def nested_values(hash)
+ hash.each_with_object([]) do |(_k, v), values|
24
v.is_a?(Hash) ? values.concat(nested_values(v)) : (values << v)
25
26
0 commit comments