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: embedded_children.rb
    path of file: ./repos/workarea/core/lib/workarea/ext/mongoid
    
    the code of the file until where you have to start completion: module Mongoid
  module Document
    # Returns all the embedded children in this document by recursion.
    #
    # @return [Array<Mongoid::Document>]
    #
    def embedded_children
      result = []

      embe
    
    def embedded_children
      result = []

      embedded_relations.each do |name, metadata|
        Array.wrap(send(name)).each do |child|
          result << child
          result += child.embedded_children
        end
      end

      result
    end