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: service_dialogs.rb
    path of file: ./repos/manageiq/lib/task_helpers/exports
    
    the code of the file until where you have to start completion: module TaskHelpers
  class Exports
    class ServiceDialogs
      def exp
    
      def export(options = {})
        export_dir = options[:directory]

        dialogs = Dialog.order(:id).all

        dialogs.each do |dialog|
          $log.info("Exporting Service Dialog: #{dialog.name} (ID: #{dialog.id})")

          dialog_hash = DialogSerializer.new.serialize([dialog])

          filename = Exports.safe_filename(dialog_hash.first['label'], options[:keep_spaces])
          File.write("#{export_dir}/#{filename}.yaml", dialog_hash.to_yaml)
        end
      end