Sha256: 0dda94a71cc4adc37ab901112afeb5ce42bf7ff2c893a8e32986a90ce2d4aaa6
Contents?: true
Size: 657 Bytes
Versions: 11
Compression:
Stored size: 657 Bytes
Contents
require 'structured_changelog/version_pattern' class StructuredChangelog class Release attr_reader :contents def self.start_with?(line) line =~ pattern end def self.pattern /^## RELEASE #{VersionPattern}$/ end def initialize(contents) @contents = contents.strip end def validate notifications = [] notifications << "No version number" if version.nil? notifications end def version version_string = contents.match(self.class.pattern)[:version] Gem::Version.new(version_string) end def <=>(release) version <=> release.version end end end
Version data entries
11 entries across 11 versions & 1 rubygems