| Class | SemanticPuppet::VersionRange |
| In: |
lib/semantic_puppet/version_range.rb
|
| Parent: | Range |
| NOT_A_VERSION_RANGE | = | ArgumentError.new("value must be a #{VersionRange}") | ||
| EMPTY_RANGE | = | VersionRange.parse('< 0.0.0').freeze | A range that matches no versions |
Parses a version range string into a comparable {VersionRange} instance.
Currently parsed version range string may take any of the following: forms:
@param range_str [String] the version range string to parse @return [VersionRange] a new {VersionRange} instance
Computes the intersection of a pair of ranges. If the ranges have no useful intersection, an empty range is returned.
@param other [VersionRange] the range to intersect with @return [VersionRange] the common subset
Returns a string representation of this range, prefering simple common expressions for comprehension.
@return [String] a range expression representing this VersionRange