diff options
Diffstat (limited to 'files/functions/gsub.rb')
-rw-r--r-- | files/functions/gsub.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/files/functions/gsub.rb b/files/functions/gsub.rb new file mode 100644 index 0000000..743a700 --- /dev/null +++ b/files/functions/gsub.rb @@ -0,0 +1,7 @@ +# generic gsub call +module Puppet::Parser::Functions + newfunction(:gsub, :type => :rvalue) do |args| + args[0].gsub(/#{args[1]}/, args[2]) + end +end + |