8 lines
156 B
Ruby
8 lines
156 B
Ruby
|
# escape slashes in a String
|
||
|
module Puppet::Parser::Functions
|
||
|
newfunction(:slash_escape, :type => :rvalue) do |args|
|
||
|
args[0].gsub(/\//, '\\/')
|
||
|
end
|
||
|
end
|
||
|
|