Sha256: 0b6a6626797ba5645f2878c7905ce3333c53b002b5c8bb6a74f12d588c0dd46e

Contents?: true

Size: 500 Bytes

Versions: 13

Compression:

Stored size: 500 Bytes

Contents

require 'ruby-progressbar'

class Progressrus
  class Store
    class ProgressBar < Base
      def persist(progress, force: false, expires_at: false)
        bar(progress).progress = progress.count
      end

      def finish
      end

      def flush
      end

      private

      def bar(progress)
        @bar ||= ::ProgressBar.create(
          title: progress.id,
          total: progress.total,
          format: "%t: %a %e %P% Processed: %c from %C",
        )
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
progressrus-1.0.3 lib/progressrus/store/progressbar.rb
progressrus-1.0.2 lib/progressrus/store/progressbar.rb
progressrus-1.0.1 lib/progressrus/store/progressbar.rb
progressrus-1.0.0 lib/progressrus/store/progressbar.rb
progressrus-0.1.8 lib/progressrus/store/progressbar.rb
progressrus-0.1.7 lib/progressrus/store/progressbar.rb
progressrus-0.1.6 lib/progressrus/store/progressbar.rb
progressrus-0.1.5 lib/progressrus/store/progressbar.rb
progressrus-0.1.4 lib/progressrus/store/progressbar.rb
progressrus-0.1.3 lib/progressrus/store/progressbar.rb
progressrus-0.1.2 lib/progressrus/store/progressbar.rb
progressrus-0.1.1 lib/progressrus/store/progressbar.rb
progressrus-0.1.0 lib/progressrus/store/progressbar.rb