Sha256: 1eed384200b636fba83f59e1f7c7b296ca134889254ef986989635733c108864
Contents?: true
Size: 523 Bytes
Versions: 7
Compression:
Stored size: 523 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.commit(:users) { |table| table.find commit.author_name } .value_or(model.new) end private attr_reader :model end end end end
Version data entries
7 entries across 7 versions & 1 rubygems