Class: Release::Notes::Prettify
- Inherits:
-
Object
- Object
- Release::Notes::Prettify
- Includes:
- Configurable
- Defined in:
- lib/release/notes/prettify.rb
Instance Attribute Summary collapse
-
#line ⇒ Object
readonly
Returns the value of attribute line.
Instance Method Summary collapse
-
#initialize(line:) ⇒ Prettify
constructor
Release::Notes::Prettify initializer.
-
#labels_regex ⇒ Regexp
private
Holds the regular expression used to match a pattern against labels.
-
#perform ⇒ String
Perform method for Release::Notes::Prettify.
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
#line ⇒ Object (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_regex ⇒ Regexp (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 |
#perform ⇒ String
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 |