Class: Release::Notes::Prettify

Inherits:
Object
  • Object
show all
Includes:
Configurable
Defined in:
lib/release/notes/prettify.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(line:) ⇒ Prettify

Release::Notes::Prettify initializer



14
15
16
# File 'lib/release/notes/prettify.rb', line 14

def initialize(line:)
  @line = line
end

Instance Attribute Details

#lineObject (readonly)

Returns the value of attribute line.



7
8
9
# File 'lib/release/notes/prettify.rb', line 7

def line
  @line
end

Instance Method Details

#labels_regexRegexp (private)

Holds the regular expression used to match a pattern against labels



34
35
36
# File 'lib/release/notes/prettify.rb', line 34

def labels_regex
  Regexp.new config_all_labels, Regexp::IGNORECASE
end

#performString

Perform method for Release::Notes::Prettify



23
24
25
# File 'lib/release/notes/prettify.rb', line 23

def perform
  line.gsub(labels_regex, "").strip
end