X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fdsa-puppet.git;a=blobdiff_plain;f=3rdparty%2Fmodules%2Fstdlib%2Flib%2Fpuppet%2Ffunctions%2Fto_yaml.rb;h=d5fe2592ecfe5eb1d20108979f5af9de9532f339;hp=fdd7370450de2004770ece926ed12486510496a0;hb=30caaa85aed7015ca0d77216bff175eebd917eb7;hpb=6f656bd4265e3dab13b9af2bf96e9044322e9d8f diff --git a/3rdparty/modules/stdlib/lib/puppet/functions/to_yaml.rb b/3rdparty/modules/stdlib/lib/puppet/functions/to_yaml.rb index fdd737045..d5fe2592e 100644 --- a/3rdparty/modules/stdlib/lib/puppet/functions/to_yaml.rb +++ b/3rdparty/modules/stdlib/lib/puppet/functions/to_yaml.rb @@ -1,4 +1,6 @@ -# 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 @@ -6,11 +8,10 @@ # 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