class Swagcov::Coverage

def collect

def collect
  openapi_files = ::Swagcov::OpenapiFiles.new(filepaths: dotfile.docs_config)
  rails_version = ::Rails::VERSION::STRING
  @routes.each do |route|
    path = route.path.spec.to_s.chomp("(.:format)")
    verb = rails_version > "5" ? route.verb : route.verb.inspect.gsub(%r{[$^/]}, "")
    next if third_party_route?(route, path, rails_version)
    if dotfile.ignore_path?(path, verb: verb)
      update_data(:ignored, verb, path, "ignored")
      next
    end
    next if dotfile.only_path_mismatch?(path)
    @data[:total_count] += 1
    if (response_keys = openapi_files.find_response_keys(path: path, route_verb: verb))
      update_data(:covered, verb, path, response_keys.join("  "))
    else
      update_data(:uncovered, verb, path, "none")
    end
  end
  @data
end