-# Take a data structure and output it as YAML
+require 'yaml'
+# @summary
+# Convert a data structure and output it as YAML
#
# @example how to output YAML
# # output yaml to a file
# ensure => file,
# content => to_yaml($myhash),
# }
-#
-#
-require 'yaml'
-
Puppet::Functions.create_function(:to_yaml) do
+ # @param data
+ #
+ # @return [String]
dispatch :to_yaml do
param 'Any', :data
end