# File lib/aws/collections.rb, line 85 def in_groups_of size, options = {}, &block group = [] each_batch(options) do |batch| batch.each do |item| group << item if group.size == size yield(group) group = [] end end end yield(group) unless group.empty? nil end