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: line_processor.rb
    path of file: ./repos/gitlabhq/lib/gitlab/word_diff
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

# Converts a line
    
      def extract
        return if empty_line?
        return Segments::DiffHunk.new(full_line) if diff_hunk?
        return Segments::Newline.new if newline_delimiter?

        Segments::Chunk.new(full_line)
      end