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: text_background_and_border_renderer.rb
    path of file: ./repos/asciidoctor-pdf/lib/asciidoctor/pdf/formatted_text
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Asciidoctor::PDF::FormattedText
  module TextBackgroundAndBorderRenderer
    module_function

    DummyText = ?\u0000

    # render_behind is called before the text is printed
    def render_behind fragment
      return if (pdf = fragment.document).scratch?
      data = fragment.format_state
      if data[:inline_block]
        padding = (height = fragment.line_heigh
    
    def render_behind fragment
      return if (pdf = fragment.document).scratch?
      data = fragment.format_state
      if data[:inline_block]
        padding = (height = fragment.line_height) - fragment.height
        at = [fragment.left, fragment.top + padding * 0.5]
        #width = data[:extend] ? (pdf.bounds.width - fragment.left) : fragment.width
        width = pdf.bounds.width - fragment.left
        fragment.conceal true # if fragment.text == DummyText
      elsif (border_offset = data[:border_offset])
        at = [fragment.left, fragment.top + border_offset]
        width = fragment.width
        height = fragment.height + border_offset * 2
      else
        at = fragment.top_left
        width = fragment.width
        height = fragment.height
      end