Sha256: 5cbf88e786c85f214624b2290b7b6e63f4d310ab85221281ec080910f3db6235
Contents?: true
Size: 521 Bytes
Versions: 16
Compression:
Stored size: 521 Bytes
Contents
# frozen_string_literal: true module Milestoner module Commits module Enrichers # Enriches a commit author by using cache. class Author include Milestoner::Import[:cache] def initialize(model: Models::User, **) @model = model super(**) end def call commit cache.read(:users) { |table| table.find commit.author_name } .value_or(model.new) end private attr_reader :model end end end end
Version data entries
16 entries across 16 versions & 1 rubygems