class Doing::Entry
An individual changelog item
Attributes
Public Class Methods
Source
# File lib/doing/changelog/entry.rb, line 10 def initialize(string, type, prefix: false) @string = string @type = type @prefix = prefix end
Public Instance Methods
Source
# File lib/doing/changelog/entry.rb, line 16 def clean(string) string.gsub(/\|/, '\|') end
Source
# File lib/doing/changelog/entry.rb, line 20 def print_prefix @prefix ? "#{@type}: " : '' end
Source
# File lib/doing/changelog/entry.rb, line 24 def to_s "- #{print_prefix}#{clean(@string)}" end