days_of_week = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
Now if we do this.
days_of_week.cycle {|day| puts day}
it will return all the days of the week over and over, forever.
Now if we do this.
days = days_of_week.cycle
we can then do this;
days.next
and it will cycle through the week and start over again once it cycled through like this;
days.next
will give you "Monday"
days.next
will give you "Tuesday"
days.next
wil give you "Wednesday"