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

module DeviseSecurity
  module Patches
    autoload :ControllerCaptcha, 'devise-security/patches/controller_captcha'
    autoload :ControllerSecurityQuestion, 'devise-security/patches/controller_security_question'

    class << self
      # rubocop:disable Metrics/AbcSize
      # rubocop:disable Metrics/CyclomaticComplexity
      # rubocop:disable Metrics/PerceivedComplexity
    
      def apply
        Devise::PasswordsController.include(Patches::ControllerCaptcha) if Devise.captcha_for_recover || Devise.security_question_for_recover
        Devise::UnlocksController.include(Patches::ControllerCaptcha) if Devise.captcha_for_unlock || Devise.security_question_for_unlock
        Devise::ConfirmationsController.include(Patches::ControllerCaptcha) if Devise.captcha_for_confirmation

        Devise::PasswordsController.include(Patches::ControllerSecurityQuestion) if Devise.security_question_for_recover
        Devise::UnlocksController.include(Patches::ControllerSecurityQuestion) if Devise.security_question_for_unlock
        Devise::ConfirmationsController.include(Patches::ControllerSecurityQuestion) if Devise.security_question_for_confirmation

        Devise::RegistrationsController.include(Patches::ControllerCaptcha) if Devise.captcha_for_sign_up
        Devise::SessionsController.include(Patches::ControllerCaptcha) if Devise.captcha_for_sign_in
      end