Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def chunked
- return enum_for(:each) unless block_given?
- each.chunk(&:year).each do |year, timestamps|
- yield year, timestamps.chunk(&:month)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement