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.cyclewe can then do this;
days.nextand it will cycle through the week and start over again once it cycled through like this;
days.nextwill give you "Monday"
days.nextwill give you "Tuesday"
days.nextwil give you "Wednesday"