Sha256: 7983b72c6f50e06bc8652b1ceed31a35ffe4758a4715ce362e0cf52ba2c522de

Contents?: true

Size: 308 Bytes

Versions: 10

Compression:

Stored size: 308 Bytes

Contents

require "progressbar"

module Shelly
  class DownloadProgressBar < ProgressBar
    def initialize(total)
      super("Progress", total)
      self.format_arguments = [:title, :percentage, :bar, :stat_for_file_transfer]
    end
  
    def progress_callback
      lambda { |size| inc(size) }
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
shelly-0.0.43 lib/shelly/download_progress_bar.rb
shelly-0.0.42 lib/shelly/download_progress_bar.rb
shelly-0.0.41 lib/shelly/download_progress_bar.rb
shelly-0.0.41.pre lib/shelly/download_progress_bar.rb
shelly-0.0.40 lib/shelly/download_progress_bar.rb
shelly-0.0.39 lib/shelly/download_progress_bar.rb
shelly-0.0.38 lib/shelly/download_progress_bar.rb
shelly-0.0.37 lib/shelly/download_progress_bar.rb
shelly-0.0.36 lib/shelly/download_progress_bar.rb
shelly-0.0.34 lib/shelly/download_progress_bar.rb