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: extractor.rb
    path of file: ./repos/gitlabhq/lib/gitlab/quick_actions
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Gitlab
  module QuickActions
    # This class takes an array of c
    
      def process_commands(matched_text, redact)
        output = matched_text[0]
        command = []

        if matched_text[:cmd]
          command = [matched_text[:cmd].downcase, matched_text[:arg]].reject(&:blank?)
          output = ''

          if redact
            output = "`/#{matched_text[:cmd]}#{" " + matched_text[:arg] if matched_text[:arg]}`"
            output += "\n" if matched_text[0].include?("\n")
          elsif keep_actions
            # put the command in a new paragraph, but without introducing newlines
            # so that each command is in its own line, while also preserving sourcemaps
            # of the content that follows.
            output = ActionController::Base.helpers.simple_format(matched_text[0].chomp)
            output += "\n" if matched_text[0].ends_with?("\n")
          end