Skip to content

Instantly share code, notes, and snippets.

@moreguppy
Created September 11, 2014 11:37
Show Gist options
  • Save moreguppy/62d09acabe7249cfa38d to your computer and use it in GitHub Desktop.
Save moreguppy/62d09acabe7249cfa38d to your computer and use it in GitHub Desktop.
Cycle method for Middleman & HAML
- (1..36).each do |i|
- cycle = i % 2 == 0 ? 'even' : 'odd'
.foo{:class => cycle} #{i}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment