Sha256: 02ee342a2a115450f40e9329cbf6fe0aa7a291ec83116bee695b3d0c4b2db1b6
Contents?: true
Size: 456 Bytes
Versions: 47
Compression:
Stored size: 456 Bytes
Contents
module Theme module UI class SyncProgressBar def initialize(syncer) @syncer = syncer end def progress(method, **args) @syncer.lock_io! 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.unlock_io! end end end end
Version data entries
47 entries across 47 versions & 1 rubygems