Skip to content

Instantly share code, notes, and snippets.

@solars
Created July 6, 2011 07:04
Show Gist options
  • Save solars/1066705 to your computer and use it in GitHub Desktop.
Save solars/1066705 to your computer and use it in GitHub Desktop.
{'AT1' => [:fu, :bar], 'AT2' => [:fu]}.to_a.each_slice(1) do |i|
puts i.inspect
end
# result
[["AT1", [:fu, :bar]]]
[["AT2", [:fu]]]
# how can I get the hashes there?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment