Class: Danger::Changelog::ChangelogLineParser
- Inherits:
-
Object
- Object
- Danger::Changelog::ChangelogLineParser
- Defined in:
- lib/changelog/changelog_line/changelog_line_parser.rb
Overview
A parser of the CHANGELOG.md lines
Class Method Summary collapse
-
.parse(line) ⇒ Object
Returns an instance of Changelog::ChangelogLine class based on the given line.
Class Method Details
.parse(line) ⇒ Object
Returns an instance of Changelog::ChangelogLine class based on the given line
10 11 12 13 14 15 16 17 |
# File 'lib/changelog/changelog_line/changelog_line_parser.rb', line 10 def self.parse(line) changelog_line_class = available_changelog_lines.find do |changelog_line| changelog_line.validates_as_changelog_line?(line) end return nil unless changelog_line_class changelog_line_class.new(line) end |