Skip to content

bauersman/counted_each

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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).

require 'counted_each'

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

(0..5000).to_a.counted_each do
  sleep(0.001)
end

About

Iterate over arrays with debug output

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages