Puppet Function: array_concat

Defined in:
modules/wmflib/lib/puppet/parser/functions/array_concat.rb
Function type:
Ruby 3.x API

Overview

array_concat()Any

Returns:

  • (Any)


17
18
19
20
21
22
23
24
25
26
27
# File 'modules/wmflib/lib/puppet/parser/functions/array_concat.rb', line 17

newfunction(:array_concat, :type => :rvalue) do |args|
  retval = []
  args.each do |arg|
      if arg.is_a? Array
          retval += arg
      else
          retval += [arg]
      end
  end
  retval
end