diff options
Diffstat (limited to 'files/functions/slash_escape.rb')
-rw-r--r-- | files/functions/slash_escape.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/files/functions/slash_escape.rb b/files/functions/slash_escape.rb new file mode 100644 index 0000000..04d3b95 --- /dev/null +++ b/files/functions/slash_escape.rb @@ -0,0 +1,7 @@ +# escape slashes in a String +module Puppet::Parser::Functions + newfunction(:slash_escape, :type => :rvalue) do |args| + args[0].gsub(/\//, '\\/') + end +end + |