/[adm]/puppet/modules/mga-common/lib/puppet/parser/functions/str_join.rb
ViewVC logotype

Contents of /puppet/modules/mga-common/lib/puppet/parser/functions/str_join.rb

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3161 - (show annotations) (download)
Thu May 23 15:06:39 2013 UTC (10 years, 11 months ago) by boklm
File size: 289 byte(s)
Add str_join function

A function to join elements from an array to create a string.
1 # str_join($array, $sep)
2 # -> return a string created by converting each element of the array to
3 # a string, separated by $sep
4
5 module Puppet::Parser::Functions
6 newfunction(:str_join, :type => :rvalue) do |args|
7 array = args[0]
8 sep = args[1]
9 return array.join(sep)
10 end
11 end

  ViewVC Help
Powered by ViewVC 1.1.30