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

module Ekylibre
  module DocumentManagement
    class DocumentArchiver
      class << self
        def build
          new(
            signer: Ekylibre::DocumentManagement::SignatureManager.build
          )
        end
      end


    
      def archive_document(pdf_content:, template:, key:, name:)
        document = Document.create!(
          nature: template.nature,
          key: key,
          name: name,
          file: StringIO.new(pdf_content),
          file_file_name: "#{name}.pdf",
          template: template
        )

        if template.signed
          signer.sign(document: document, user: document.creator)
        end

        document
      end