class Integer
Add times_with_progress
method to Integer
Public Instance Methods
times_with_progress(title = nil) { |i| ... }
click to toggle source
run `times` with progress
100.times_with_progress('Numbers') do |number| # code end
# File lib/progress/integer.rb, line 11 def times_with_progress(title = nil) Progress.start(title, self) do times do |i| Progress.step do yield i end end end end