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: header.rb
    path of file: ./repos/kramdown/lib/kramdown/parser/kramdown
    
    the code of the file until where you have to start completion: # -*- coding: utf-8; frozen_string_literal: true -*-
#
#--
# Copyright (C) 2009-2019 Thomas Leitner <t_leitner@gmx.at>
#
# This file is part of kramdown which is licensed under the MIT.
#++
#

require 'kramdown/parser/kramdown/block_
    
      def add_header(level, text, id)
        start_line_number = @src.current_line_number
        @src.pos += @src.matched_size
        el = new_block_el(:header, nil, nil, level: level, raw_text: text, location: start_line_number)
        add_text(text, el)
        el.attr['id'] = id if id
        @tree.children << el
      end