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: node.rb
    path of file: ./repos/ruby-packer/ruby/lib/rexml/light
    
    the code of the file until where you have to start completion: # frozen_string_literal: false
require_relative '../xmltokens'

# [ :element, parent, name, at
    
      def << element
        if node_type() == :text
          at(-1) << element
        else
          newnode = Node.new( element )
          newnode.parent = self
          self.push( newnode )
        end