Sha256: 3565edf62d9d21f5bf341a027f70a0f4a58fa86b0deeef4e5e64dd6e53d969b7
Contents?: true
Size: 613 Bytes
Versions: 19
Compression:
Stored size: 613 Bytes
Contents
# frozen_string_literal: true module IdentityCache module LoadStrategy class MultiLoadRequest def initialize(load_requests) @load_requests = load_requests end def db_keys @load_requests.flat_map(&:db_keys).tap(&:uniq!) end def after_load(all_results) @load_requests.each do |load_request| load_result = {} load_request.db_keys.each do |key| load_result[key] = all_results[key] end load_request.after_load(load_result) end end end private_constant :MultiLoadRequest end end
Version data entries
19 entries across 19 versions & 1 rubygems