class SemVer

def <=> other

def <=> other
  maj = major.to_i <=> other.major.to_i
  return maj unless maj == 0
  min = minor.to_i <=> other.minor.to_i
  return min unless min == 0
  pat = patch.to_i <=> other.patch.to_i
  return pat unless pat == 0
  spe = special <=> other.special
  return spec unless spe == 0
  0
end