Sha256: 72e9ecdbe1d73ec1066e465c55aee33c76d3ce45a2b4babe0bae9178f3b47257
Contents?: true
Size: 274 Bytes
Versions: 39
Compression:
Stored size: 274 Bytes
Contents
# frozen_string_literal = true RSpec.describe :index_by do link :index_by, from: :ree_array it { list = [ {id: 1}, {id: 2} ] result = index_by(list) { _1[:id] } expect(result).to eq( { 1 => {id: 1}, 2 => {id: 2} } ) } end
Version data entries
39 entries across 39 versions & 1 rubygems