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: pwned_password_downloader.rb
    path of file: ./repos/identity-idp/lib
    
    the code of the file until where you have to start completion: #!/usr/bin/env ruby
require 'fileutils'
require 'net/http/persistent'
require 'retries'
require 'ruby-progressbar'
require 'ruby-progressbar/outputs/null'

class PwnedPasswordDownloader
  attr_reader :destination,
              :num_threads,
              :keep_threshold,
              :output_progress

  alias_method :output_progress?, :output_progress

  RANGE_API_ROOT = 'https://api.pwnedpasswords.com/range/'
  SHA1_LENGTH = 40
  HASH_PREFIX_LENGTH = 5
  OCCURRENCE_OFFSET = SHA1_LENGTH - HASH_PREFIX_LENGTH + ':'.length

  def initialize(
    destination: 'tmp/pwned',
    num_threads: 64,
    keep_threshold: 30,
    output_progress: true
  )
    @destination = destination
    @num_thre
    
  def run!(start: '00000', finish: 'FFFFF')
    (start.to_i(16)..finish.to_i(16)).each do |prefix_num|
      queue << prefix_num.to_s(16).upcase.rjust(HASH_PREFIX_LENGTH, '0')
    end

    FileUtils.mkdir_p(destination)

    progress_bar = ProgressBar.create(
      title: 'Downloading...',
      total: queue.size,
      output: output_progress? ? $stdout : ProgressBar::Outputs::Null,
      format: '[ %t ] %p%% %B %a (%E)',
    )

    failed_prefixes = Queue.new

    [num_threads, queue.size].min.times do
      Thread.new do |thread_id|
        net_http = Net::HTTP::Persistent.new(name: "thread_id_#{thread_id}")

        while (prefix = queue.pop)
          if already_downloaded?(prefix)
            progress_bar.increment
            next
          end

          begin
            write_one(
              prefix:,
              content: with_retries(max_tries: 5, rescue: Socket::ResolutionError) do
                download_one(prefix:, net_http:)
              end,
            )
          rescue
            failed_prefixes << prefix
          else
            progress_bar.increment
          end
        end
      ensure
        net_http.shutdown
      end