lib/squib/progress.rb in squib-0.0.4 vs lib/squib/progress.rb in squib-0.0.5

- old
+ new

@@ -21,18 +21,18 @@ def initialize(enabled) @enabled = enabled end - def start(title="", total=100, &block) + def start(title='', total=100, &block) if @enabled - @bar = ProgressBar.create(title: title, total: total, format: '%t <%B> %p%% %a') + @bar = ProgressBar.create(title: title, total: total, format: '%t <%B> %p%% %a') yield(@bar) @bar.finish - else + else yield(Squib::DoNothing.new) end end end -end \ No newline at end of file +end