Class: Drumknott::Outputs::ProgressBar
- Defined in:
- lib/drumknott/outputs/progress_bar.rb
Instance Method Summary collapse
Methods inherited from Silent
Constructor Details
This class inherits a constructor from Drumknott::Outputs::Silent
Instance Method Details
#call(label, collection) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/drumknott/outputs/progress_bar.rb', line 4 def call(label, collection) = ::ProgressBar.create :title => label, :total => collection.length collection.each do |item| block.call item .increment end end |