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: action_text.rb
    path of file: ./repos/tapioca/lib/tapioca/dsl/compilers
    
    the code of the file until where you have to start completion: # typed: strict
# frozen_string_literal: true

return unless defined?(ActiveRecord::Base)

module Tapioca
  module Dsl
    module Compilers
      # `Tapioca::Dsl::Compilers::ActionText` decorates RBI files for subclasses of
      # `ActiveRecord::Base` that declare [has_rich_text](https://edgeguides.rubyonrails.org/action_text_overview.html#creating-rich-text-content)
      #
      # For example, with the following `ActiveRecord::Base` subclass:
      #
      # ~~
    
        def decorate
          root.create_path(constant) do |scope|
            self.class.action_text_associations(constant).each do |name|
              reflection = constant.reflections.fetch(name)
              type = reflection.options.fetch(:class_name)
              name = reflection.name.to_s.sub("rich_text_", "")
              scope.create_method(
                name,
                return_type: type,
              )
              scope.create_method(
                "#{name}?",
                return_type: "T::Boolean",
              )
              scope.create_method(
                "#{name}=",
                parameters: [create_param("value", type: "T.nilable(T.any(#{type}, String))")],
                return_type: "T.untyped",
              )
            end
          end
        end