How to create an infinite enumerable of Times?
Posted
by Alex Baranosky
on Stack Overflow
See other posts from Stack Overflow
or by Alex Baranosky
Published on 2010-03-25T03:27:32Z
Indexed on
2010/03/25
3:33 UTC
Read the original article
Hit count: 387
I want to be able to have an object extend Enumerable in Ruby to be an infinite list of Mondays (for example).
So it would yield: March 29, April 5, April 12...... etc
How can I implement this in Ruby?
© Stack Overflow or respective owner