blob: c5fa1c8979706f60d8b7b28b336bb42a38701dcf (
plain)
1
2
3
4
5
6
7
8
|
Puppet::Parser::Functions::newfunction(:array_join,
:type => :rvalue,
:doc => "Join a list of strings with an optional delimiter.") do |args|
unless (1..2).include?(args.length)
raise Puppet::ParseError, 'array_join() takes 1 or 2 arguments'
end
args.first.join args.last
end
|