def download_manga(illust, pattern, &block)
      action = DownloadActionRegistry.new(&block)
      illust.original_image_urls.each_with_index do |url, n|
        begin
          action.before_each.call(url, n) if action.before_each
          filename = filename_from_pattern(pattern, illust, url)
          FileUtils.mkdir_p(File.dirname(filename))
          @agent.download(url, filename, [], illust.original_image_referer)
          action.after_each.call(url, n) if action.after_each
        rescue
          action.on_error ? action.on_error.call($!) : raise
        end
      end
    end
def download_manga(illust, pattern, &block)
      action = DownloadActionRegistry.new(&block)
      illust.original_image_urls.each_with_index do |url, n|
        begin
          action.before_each.call(url, n) if action.before_each
          filename = filename_from_pattern(pattern, illust, url)
          FileUtils.mkdir_p(File.dirname(filename))
          @agent.download(url, filename, [], illust.original_image_referer)
          action.after_each.call(url, n) if action.after_each
        rescue
          action.on_error ? action.on_error.call($!) : raise
        end
      end
    end
Downloads the images to +pattern+
 @param [Pixiv::Illust] illust the manga to download
 @param [Array<String, Symbol, #call>] pattern pattern for {#filename_from_pattern}
 @note +illust#manga?+ must be +true+
 @todo Document +&block+