Sha256: 3eacc24608ae98e3a46b54245bea8460ca0afdf6be298c0299d2de168472ea4c
Contents?: true
Size: 465 Bytes
Versions: 19
Compression:
Stored size: 465 Bytes
Contents
module Theme module UI class SyncProgressBar def initialize(syncer) @syncer = syncer end def progress(method, **args) @syncer.delay_errors! CLI::UI::Progress.progress do |bar| @syncer.public_send(method, **args) do |left, total| bar.tick(set_percent: 1 - left.to_f / total) end bar.tick(set_percent: 1) end @syncer.report_errors! end end end end
Version data entries
19 entries across 19 versions & 1 rubygems