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

require "rails"

module Alchemy
  module Generators
    class Base < ::Rails::Generators::Base
      class_option :template_engine, type: :string, aliases: "-e", desc: 'Template engine for the views. Available options are "erb", "haml", and "slim".'

      private

      def conditional_template(source, destination)
        files = Dir.
    
      def conditional_template(source, destination)
        files = Dir.glob(destination.gsub(/\.([a-z]+)$/, "*"))
        if files.any?
          ext = File.extname(files.first)[1..]

          # If view already exists using a different template engine, change
          # source and destination file names to use that engine.
          if ext != template_engine.to_s
            say_status :warning, "View uses unexpected template engine '#{ext}'.", :cyan
            destination = destination.gsub(/#{template_engine}$/, ext)
            source = source.gsub(/#{template_engine}$/, ext)
          end