def extract_to(destination)
      raise ArgumentError, "Processor: destination is required!" if destination.nil? or destination.empty?
      raise RuntimeError, "destination directory is not valid" unless Dir.exists?(destination)

      @list_of_files = []
      result = execute_command(archive_options[@archive_type][:decompress].gsub("<filename>", filename).gsub("<extractdir>", destination))
      result.scan(archive_options[@archive_type][:file_list_regex]).each do |slice|
        # The gsub("\b","") is a hack to make the list file for unrar work.
        @list_of_files << slice.first.gsub("\b","").strip
      end
      @list_of_files
    end
def extract_to(destination)
      raise ArgumentError, "Processor: destination is required!" if destination.nil? or destination.empty?
      raise RuntimeError, "destination directory is not valid" unless Dir.exists?(destination)

      @list_of_files = []
      result = execute_command(archive_options[@archive_type][:decompress].gsub("<filename>", filename).gsub("<extractdir>", destination))
      result.scan(archive_options[@archive_type][:file_list_regex]).each do |slice|
        # The gsub("\b","") is a hack to make the list file for unrar work.
        @list_of_files << slice.first.gsub("\b","").strip
      end
      @list_of_files
    end
Extracts the content of the compressed file to the specified directory.
 Warning: it will overwrite the existing files without asking.

 @param [String] destination the directory with full path to extracts the files to.

 @return [Array] an array of strings with the extracted file list.