summaryrefslogtreecommitdiff
path: root/lib/puppet/parser/functions/hash.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/parser/functions/hash.rb')
-rw-r--r--lib/puppet/parser/functions/hash.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/puppet/parser/functions/hash.rb b/lib/puppet/parser/functions/hash.rb
index f0c01d4..453ba1e 100644
--- a/lib/puppet/parser/functions/hash.rb
+++ b/lib/puppet/parser/functions/hash.rb
@@ -4,6 +4,13 @@
module Puppet::Parser::Functions
newfunction(:hash, :type => :rvalue, :doc => <<-EOS
+This function converts and array into a hash.
+
+*Examples:*
+
+ hash(['a',1,'b',2,'c',3])
+
+Would return: {'a'=>1,'b'=>2,'c'=>3}
EOS
) do |arguments|