class Sphyg::Enumerators::Cycle

Loops through each individual frame of the given sequence. Just like Enumerator#next but wraps around the array.

Public Instance Methods

next() click to toggle source
# File lib/sphyg/enumerators/cycle.rb, line 8
def next
  @frames_index ||= 0
  @frames[(@frames_index += 1) % @frames.length]
end