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: parser.rb
    path of file: ./repos/stackneveroverflow/vendor/bundle/ruby/2.3.0/gems/rack-2.0.3/lib/rack/multipart
    
    the code of the file until where you have to start completion: require 'rack/utils'

module Rack
  module Multipart
    
      def get_filename(head)
        filename = nil
        case head
        when RFC2183
          params = Hash[*head.scan(DISPPARM).flat_map(&:compact)]

          if filename = params['filename']
            filename = $1 if filename =~ /^"(.*)"$/
          elsif filename = params['filename*']
            encoding, _, filename = filename.split("'", 3)
          end