lib/unwrappr/gem_version.rb in unwrappr-0.3.5 vs lib/unwrappr/gem_version.rb in unwrappr-0.4.0

- old
+ new

@@ -11,13 +11,14 @@ @version_string = version_string @version = Gem::Version.create(version_string) @major = segment(0) @minor = segment(1) @patch = segment(2) + @hotfix = segment(3) end - attr_reader :major, :minor, :patch, :version + attr_reader :major, :minor, :patch, :hotfix, :version def major_difference?(other) (major != other.major) end @@ -28,9 +29,16 @@ def patch_difference?(other) (major == other.major) && (minor == other.minor) && (patch != other.patch) + end + + def hotfix_difference?(other) + (major == other.major) && + (minor == other.minor) && + (patch == other.patch) && + (hotfix != other.hotfix) end def <=>(other) @version <=> other.version end