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