def export(want)
      begin
        data =
          case File.extname(want.file)
          when '.ass'
            ASS.master(want.subtitles)
            ASS.export(want.subtitles)
          when '.ssa'
            SSA.master(want.subtitles)
            SSA.export(want.subtitles)
          when '.srt'
            SRT.master(want.subtitles)
            SRT.export(want.subtitles)
          when '.yt'
            YT.master(want.subtitles)
            YT.export(want.subtitles)
          else
            fail 'Not supported'
          end
      rescue
        @report << "Failure while exporting #{File.extname(want.file)[1..3].upcase} for #{want.file}"
        raise AbortJob
      ensure
        want.subtitles = nil
      end

      if want.encoding
        begin
          data.encode!(want.encoding)
        rescue
          @report << "Failure while transcoding from #{data.encoding} to #{want.encoding} for #{want.file}"
          raise AbortJob
        end
      end

      begin
        IO.write(want.file, data)
      rescue
        @report << "Failure while writing to #{want.file}"
        raise AbortJob
      end
    end
def export(want)
      begin
        data =
          case File.extname(want.file)
          when '.ass'
            ASS.master(want.subtitles)
            ASS.export(want.subtitles)
          when '.ssa'
            SSA.master(want.subtitles)
            SSA.export(want.subtitles)
          when '.srt'
            SRT.master(want.subtitles)
            SRT.export(want.subtitles)
          when '.yt'
            YT.master(want.subtitles)
            YT.export(want.subtitles)
          else
            fail 'Not supported'
          end
      rescue
        @report << "Failure while exporting #{File.extname(want.file)[1..3].upcase} for #{want.file}"
        raise AbortJob
      ensure
        want.subtitles = nil
      end

      if want.encoding
        begin
          data.encode!(want.encoding)
        rescue
          @report << "Failure while transcoding from #{data.encoding} to #{want.encoding} for #{want.file}"
          raise AbortJob
        end
      end

      begin
        IO.write(want.file, data)
      rescue
        @report << "Failure while writing to #{want.file}"
        raise AbortJob
      end
    end
Exports what we {Want}

 @param want [Want] What we {Want}