Created
May 16, 2011 09:44
-
-
Save aziz/974157 to your computer and use it in GitHub Desktop.
in_cluomns Array monkey patck
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Array | |
def in_columns(count) | |
in_groups_of(count).transpose.collect(&:compact) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment