Class: Milestoner::Commits::Enrichers::Author
- Inherits:
-
Object
- Object
- Milestoner::Commits::Enrichers::Author
- Defined in:
- lib/milestoner/commits/enrichers/author.rb
Overview
Enriches a commit author by using cache.
Instance Method Summary collapse
- #call(commit) ⇒ Object
-
#initialize(model: Models::User) ⇒ Author
constructor
A new instance of Author.
Constructor Details
Instance Method Details
#call(commit) ⇒ Object
15 16 17 18 |
# File 'lib/milestoner/commits/enrichers/author.rb', line 15 def call commit cache.read(:users) { |table| table.find commit. } .value_or(model.new) end |