module Dir

Public Class Methods

glob_escape(path) click to toggle source

prefix any glob-special characters in path with backslashes

# File lib/api_hammer/glob_escape.rb, line 3
def glob_escape(path)
  path.gsub(/[*?\[\]{}\\]/) { |match| "\\#{match}" }
end