summaryrefslogtreecommitdiff
path: root/lib/puppet/parser/functions/zip.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet/parser/functions/zip.rb')
-rw-r--r--lib/puppet/parser/functions/zip.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/puppet/parser/functions/zip.rb b/lib/puppet/parser/functions/zip.rb
index 024d64a..2b56e9c 100644
--- a/lib/puppet/parser/functions/zip.rb
+++ b/lib/puppet/parser/functions/zip.rb
@@ -4,6 +4,15 @@
module Puppet::Parser::Functions
newfunction(:zip, :type => :rvalue, :doc => <<-EOS
+Takes one element from first array and merges corresponding elements from second array. This generates a sequence of n-element arrays, where n is one more than the count of arguments.
+
+*Example:*
+
+ zip(['1','2','3'],['4','5','6'])
+
+Would result in:
+
+ ["1", "4"], ["2", "5"], ["3", "6"]
EOS
) do |arguments|