Skip to content

Commit 8abe016

Browse files
committed
Addressing review comments
1 parent ef19ca3 commit 8abe016

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/puppet/functions/stdlib/nested_values.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
# $data = $hash.stdlib::nested_values
1313
# #Output : ["value1", "value2.1", "value3"]
1414
Puppet::Functions.create_function(:'stdlib::nested_values') do
15-
# @param options A (nested) hash
15+
# @param hash A (nested) hash
1616
# @return All the values found in the input hash included those deeply nested.
1717
dispatch :nested_values do
18-
param 'Hash', :options
18+
param 'Hash', :hash
1919
return_type 'Array'
2020
end
2121

22-
def nested_values(options)
23-
options.each_with_object([]) do |(_k, v), values|
22+
def nested_values(hash)
23+
hash.each_with_object([]) do |(_k, v), values|
2424
v.is_a?(Hash) ? values.concat(nested_values(v)) : (values << v)
2525
end
2626
end

0 commit comments

Comments
 (0)