class Milestoner::Commits::Enrichers::Note
Enriches commit notes by rendering as HTML based on trailer information.
Attributes
Public Class Methods
Source
# File lib/milestoner/commits/enrichers/note.rb, line 10 def initialize(key: "Format", renderer: Renderers::Universal.new, **) super(**) @key = key @renderer = renderer end
Calls superclass method
Public Instance Methods
Source
# File lib/milestoner/commits/enrichers/note.rb, line 16 def call commit commit.trailer_value_for(key) .value_or(settings.commit_format) .then { |format| renderer.call commit.notes, for: format.to_sym } end