1 2 3 4 5 6 7
# generic gsub call module Puppet::Parser::Functions newfunction(:gsub, :type => :rvalue) do |args| args[0].gsub(/#{args[1]}/, args[2]) end end