Skip to content
Snippets Groups Projects
Commit 97159bb5 authored by Thomas Bellman's avatar Thomas Bellman
Browse files

New function concat() for concatenating arrays.

This was originally commit 4a1e09fbba5e in nsc-puppet-utils.
parent 939247c3
No related branches found
No related tags found
No related merge requests found
module Puppet::Parser::Functions
newfunction(:concat, :type => :rvalue, :doc => "\
Concatenate the arrays passed as arguments.
This function is needed since the + operator in the Puppet DSL
only handles numbers.
") \
do |args|
result = []
args.each do |a|
result += a
end
return result
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment