vendored/puppet/lib/puppet/functions/hiera_hash.rb in bolt-0.17.1 vs vendored/puppet/lib/puppet/functions/hiera_hash.rb in bolt-0.17.2
- old
+ new
@@ -27,11 +27,11 @@
# * If Hiera doesn't find a matching key in the overriding hierarchy level, it continues
# searching the rest of the hierarchy.
#
# @example Using `hiera_hash`
#
-# ~~~ yaml
+# ```yaml
# # Assuming hiera.yaml
# # :hierarchy:
# # - web01.example.com
# # - common
#
@@ -42,36 +42,36 @@
#
# # Assuming web01.example.com.yaml:
# # users:
# # administrators:
# # 'aberry': 'Amy Berry'
-# ~~~
+# ```
#
-# ~~~ puppet
+# ```puppet
# # Assuming we are not web01.example.com:
#
# $allusers = hiera_hash('users', undef)
#
# # $allusers contains {regular => {"cdouglas" => "Carrie Douglas"},
# # administrators => {"aberry" => "Amy Berry"}}
-# ~~~
+# ```
#
# You can optionally generate the default value with a
# [lambda](https://docs.puppetlabs.com/puppet/latest/reference/lang_lambdas.html) that
# takes one parameter.
#
# @example Using `hiera_hash` with a lambda
#
-# ~~~ puppet
+# ```puppet
# # Assuming the same Hiera data as the previous example:
#
# $allusers = hiera_hash('users') | $key | { "Key \'${key}\' not found" }
#
# # $allusers contains {regular => {"cdouglas" => "Carrie Douglas"},
# # administrators => {"aberry" => "Amy Berry"}}
# # If hiera_hash couldn't match its key, it would return the lambda result,
# # "Key 'users' not found".
-# ~~~
+# ```
#
# `hiera_hash` expects that all values returned will be hashes. If any of the values
# found in the data sources are strings or arrays, Puppet raises a type mismatch error.
#
# See