This small extension to ruby's Array class provides two additional iterators, Array#each_with_floe and Array#each_with_index_floe, that simplify the reasonably-common need to specially handle "floe"--i.e., first, last, odd, even--when iterating through the elements of an array. It's particularly handy for generating CSS classes.
Required Ruby Version
None
Required Rubygems Version
>= 1.3.7
Authors
ronen barzel
Versions
-
1.1.3
-
source
- 1.1.3 source December 14, 2011 (7.5 KB)
-
-
1.1.2
-
source
- 1.1.2 source April 24, 2011 (8 KB)
-
-
1.1.0
-
source
- 1.1.0 source April 10, 2011 (8 KB)
-
-
1.0.0
-
source
- 1.0.0 source April 09, 2011 (7.5 KB)
-