class Swagcov::Dotfile

def path_config_regex path_config

def path_config_regex path_config
  return unless path_config
  config =
    path_config.map do |path|
      if path.is_a?(::Hash)
        "^#{path.keys.first}$"
      else
        path.chr == "^" ? path : "^#{path}$"
      end
    end
  /#{config.join('|')}/
end