class PimpMyChangelog::Parser
Attributes
changelog[R]
Public Class Methods
new(changelog)
click to toggle source
@param [String] changelog
# File lib/pimpmychangelog/parser.rb, line 6 def initialize(changelog) @changelog = changelog end
Public Instance Methods
content()
click to toggle source
@return [String] the changelog content without the link definitions
# File lib/pimpmychangelog/parser.rb, line 11 def content @changelog.split(Pimper::SEPARATOR).first end
contributors()
click to toggle source
@return [Array] ordered array of contributors found in the changelog
Example: ['gregbell', 'pcreux', 'samvincent']
# File lib/pimpmychangelog/parser.rb, line 23 def contributors changelog.scan(/@([\w-]+)/).flatten.uniq.sort end
issues()
click to toggle source
@return [Array] ordered array of issue numbers found in the changelog
Example: ['12', '223', '470']
# File lib/pimpmychangelog/parser.rb, line 17 def issues changelog.scan(/#(\d+)/).flatten.uniq.sort_by(&:to_i) end