Module: Enumerable

Defined in:
lib/enumerable.rb

Instance Method Summary collapse

Instance Method Details

#each_with_progress(name) ⇒ Object



2
3
4
5
6
7
8
9
# File 'lib/enumerable.rb', line 2

def each_with_progress(name)
  Progress.start(name, length) do
    each do |item|
      yield item
      Progress.step
    end
  end
end