--- !ruby/object:RI::MethodDescription aliases: [] block_params: comment: - !ruby/struct:SM::Flow::P body: Iterate through slices. If slice steps is not given, the arity of the block is used. - !ruby/struct:SM::Flow::VERB body: " x = []\n [1,2,3,4].each_by{ |a,b| x << [a,b] }\n x #=> [ [1,2], [3,4] ]\n\n x = []\n [1,2,3,4,5,6].each_by(3){ |a| x << a }\n x #=> [ [1,2,3], [4,5,6] ]\n" - !ruby/struct:SM::Flow::P body: This is just like each_slice, except that it will check the arity of the block. If each_slice ever suppots this this method can be deprecated. - !ruby/struct:SM::Flow::VERB body: " CREDIT: Trans\n" full_name: Enumerable#each_by is_singleton: false name: each_by params: (steps=nil, &block) visibility: public