Sha256: f47c23aa5ea38bd730b38258928882421751aeb8f3207a5906d86f9240ca1dd8

Contents?: true

Size: 319 Bytes

Versions: 17

Compression:

Stored size: 319 Bytes

Contents

class Integer
  # note that Progress.step is called automatically
  # ==== Example
  #   100.times_with_progress('Numbers') do |number|
  #     sleep(number)
  #   end
  def times_with_progress(name)
    Progress.start(name, self) do
      times do |i|
        yield i
        Progress.step
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
progress-0.2.2 lib/progress/integer.rb
progress-0.2.1 lib/progress/integer.rb
progress-0.2.0 lib/progress/integer.rb
progress-0.1.2 lib/progress/integer.rb
progress-0.1.1.3 lib/progress/integer.rb
progress-0.1.1.2 lib/progress/integer.rb
progress-0.1.1.1 lib/progress/integer.rb
progress-0.1.1.0 lib/progress/integer.rb
progress-0.1.0.3 lib/progress/integer.rb
progress-0.1.0.0 lib/progress/integer.rb
progress-0.1.0.1 lib/progress/integer.rb
progress-0.1.0.2 lib/progress/integer.rb
progress-0.0.3 lib/progress/integer.rb
progress-0.0.7.1 lib/progress/integer.rb
progress-0.0.5 lib/progress/integer.rb
progress-0.0.7 lib/progress/integer.rb
progress-0.0.4 lib/progress/integer.rb