Class: Danger::Changelog::ChangelogPlaceholderLine

Inherits:
ChangelogLine
  • Object
show all
Defined in:
lib/changelog/changelog_line/changelog_placeholder_line.rb

Overview

A CHANGELOG.md line represents the “Your contribution here”.

Constant Summary

Constants inherited from ChangelogLine

Danger::Changelog::ChangelogLine::DELIMITER, Danger::Changelog::ChangelogLine::NON_DELIMITERS, Danger::Changelog::ChangelogLine::PAIRED

Instance Attribute Summary

Attributes inherited from ChangelogLine

#line, #validation_result

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ChangelogLine

#balanced?, #initialize, #invalid?

Constructor Details

This class inherits a constructor from Danger::Changelog::ChangelogLine

Class Method Details

.validates_as_changelog_line?(line) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
12
13
# File 'lib/changelog/changelog_line/changelog_placeholder_line.rb', line 9

def self.validates_as_changelog_line?(line)
  return true if line == Danger::Changelog.config.placeholder_line

  false
end

Instance Method Details

#valid?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/changelog/changelog_line/changelog_placeholder_line.rb', line 5

def valid?
  ChangelogPlaceholderLine.validates_as_changelog_line?(line)
end