allows method

bool allows (Version other)
override

Tests if other falls within this version range.

Implementation

bool allows(Version other) {
  if (min != null) {
    if (other < min) return false;
    if (!includeMin && other == min) return false;
  }

  if (max != null) {
    if (other > max) return false;
    if (!includeMax && other == max) return false;
  }

  return true;
}