Mercurial > repos > other > Puppet
annotate modules/website/lib/puppet/parser/functions/hash_to_csp.rb @ 237:1e65604c182a puppet-3.6
Add missing custom function
Forgot to "hg add" it
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Fri, 20 Dec 2019 09:41:34 +0000 |
parents | |
children |
rev | line source |
---|---|
237 | 1 module Puppet::Parser::Functions |
2 newfunction(:hash_to_csp, :type => :rvalue) do |args| | |
3 csp_defaults = args[0] | |
4 csp_overrides = args[1] | |
5 csp_combined = csp_defaults.merge(csp_overrides == "" ? {} : csp_overrides) | |
6 csp_string = csp_combined.map { |index, value| "#{index} #{value}" }.join ("; ") | |
7 end | |
8 end |