Sha256: f2ab2d9c6e94c2bf28b001b981553cf9ed60a041036d0e2dca3afdc4f0b07848
Contents?: true
Size: 469 Bytes
Versions: 39
Compression:
Stored size: 469 Bytes
Contents
# frozen_string_literal: true module Doing # An individual changelog item class Entry attr_reader :type, :string attr_writer :prefix def initialize(string, type, prefix: false) @string = string @type = type @prefix = prefix end def clean(string) string.gsub(/\|/, '\|') end def print_prefix @prefix ? "#{@type}: " : '' end def to_s "- #{print_prefix}#{clean(@string)}" end end end
Version data entries
39 entries across 39 versions & 1 rubygems