Puppet Function: wildfly::objectify
- Defined in:
- functions/objectify.pp
- Function type:
- Puppet Language
Overview
Converts a LIST of STRINGs and OBJECTs into an OBJECT of OBJECTs.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'functions/objectify.pp', line 5
function wildfly::objectify(Array[Variant[String, Hash]] $elements) {
$objectified = $elements.map |$element| {
if $element.is_a(String) {
[$element, {}]
} else {
$element.map |$key, $value| { [$key, $value] }
}
}
hash($objectified)
}
|