Sha256: e3eb20b671cb5d75e62b5216c80981ead0ebbe1444da7db69fcb66a2f6e74b0d
Contents?: true
Size: 768 Bytes
Versions: 11
Compression:
Stored size: 768 Bytes
Contents
# frozen_string_literal: true module Unwrappr module Writers # Add the gem name to the annotation as a heading. If a homepage # URI has been determined this heading will link to that page. # # Implements the `annotation_writer` interface required by the # LockFileAnnotator. module Title class << self def write(gem_change, gem_change_info) embellished_gem_name = maybe_link( gem_change.name, gem_change_info[:ruby_gems]&.homepage_uri ) "### #{embellished_gem_name}\n" end private def maybe_link(text, url) if url.nil? text else "[#{text}](#{url})" end end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems