You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: wildcard_matcher.rb
    path of file: ./repos/dependabot-core/common/lib
    
    the code of the file until where you have to start completion: # typed: strong
# frozen_string_literal: true

require "sorbet-runtime"

class WildcardMatcher
  extend T::Sig

  sig { params(wildcard_string: T.nilable(String), candidate_str
    
  def self.match?(wildcard_string, candidate_string)
    return false unless wildcard_string && candidate_string

    regex_string = "a#{wildcard_string.downcase}a".split("*")
                                                  .map { |p| Regexp.quote(p) }
                                                  .join(".*").gsub(/^a|a$/, "")
    regex = /^#{regex_string}$/
    regex.match?(candidate_string.downcase)
  end