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: match_finder.rb
    path of file: ./repos/stubb/lib/stubb
    
    the code of the file until where you have to start completion: module Stubb

  class NoMatch < NotFound; end

  class MatchFinder < Finder
    private
    def projected_path
      built_path  = []
      last_is_dir = false
      request.path_parts.each_with_index do |level, index|
        if match = literal_directory(built_path, level)
          last_is_dir = true
        elsif match = literal_file(built_path, le
    
    def projected_path
      built_path  = []
      last_is_dir = false
      request.path_parts.each_with_index do |level, index|
        if match = literal_directory(built_path, level)
          last_is_dir = true
        elsif match = literal_file(built_path, level)
          last_is_dir = false
        elsif match = matching_directory(built_path)
          last_is_dir = true
        elsif match = matching_file(built_path)
          last_is_dir = false
        else
          raise NoMatch.new("Not found.")
        end

        built_path << match
      end