Method: Squib::Progress#start
- Defined in:
- lib/squib/progress.rb
#start(title = '', total = 100, &block) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
26 27 28 29 30 31 32 33 34 |
# File 'lib/squib/progress.rb', line 26 def start(title='', total=100, &block) if @enabled @bar = ProgressBar.create(title: title, total: total, format: '%t <%B> %p%% %a') yield(@bar) @bar.finish else yield(Squib::DoNothing.new) end end |