Class: Musical::Notification::ProgressBar

Inherits:
ProgressBar
  • Object
show all
Defined in:
lib/musical/notification/progress_bar.rb

Constant Summary collapse

FORMAT =
'%a %B %p%% %t'

Class Method Summary collapse

Class Method Details

.create(options = {}) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/musical/notification/progress_bar.rb', line 7

def self.create(options = {})
  options = { format: FORMAT }.merge(options)
  progress_bar = super(options)

  Thread.new do
    while !progress_bar.finished?
      progress_bar.refresh
    end
  end
  progress_bar
end