    # File lib/core-uncommon/facets/module/class_extend.rb, line 39
      def class_extend(*mods, &block)
        class_extension = Module.new

        class_extension.__send__(:include, *mods)
        class_extension.module_eval(&block) if block_given?

        extend(class_extension)  # extend this module too

        append_method = method(:append_features)

        (class << self; self; end).class_eval do
          define_method(:append_features) do |mod|
            append_method.call(mod)
            mod.extend(class_extension)
            if mod.instance_of?(Module)
              mod.__send__(:class_extend, class_extension)
            end
          end
        end

        class_extensions << class_extension
      end