Skip to content
Iterate over arrays with debug output
Ruby
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
spec
.document
.gitignore
LICENSE
README.rdoc
Rakefile
VERSION
counted_each.gemspec

README.rdoc

counted_each

A extension for core Array class adding a #counted_each method that outputs count and time to finish iteration to STDERR (or a different IO Stream).

Usage:

require 'counted_each'

# optional, default is STDERR
CountedEach::Config.output = STDOUT

(0..5000).to_a.counted_each do
  sleep(0.001)
end
You can’t perform that action at this time.