Skip to content

Instantly share code, notes, and snippets.

@timriley
Created February 12, 2009 21:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save timriley/62885 to your computer and use it in GitHub Desktop.
Save timriley/62885 to your computer and use it in GitHub Desktop.
helpers do
def cycle
@_cycle ||= reset_cycle
@_cycle = [@_cycle.pop] + @_cycle
@_cycle.first
end
def reset_cycle
@_cycle = %w(even odd)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment