struct Zap::Utils::Semver::Comparator

Overview

A comparator is composed of an operator and a version.

Defined in:

utils/semver/comparator.cr

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from class Object

or(other : T) : T | self forall T or, pipe(&) pipe

Constructor Detail

def self.new(operator : Operator, major : UInt128 = 0, minor : UInt128 = 0, patch : UInt128 = 0, prerelease = nil, build_metadata = nil) #

[View source]
def self.new(operator : Operator, partial : Regex::MatchData) #

[View source]
def self.new(operator : Operator, partial : Partial) #

[View source]
def self.new(operator : Operator, version : Zap::Utils::Semver::Version = Version.new) #

[View source]

Class Method Detail

def self.parse(operator : Operator, version_str : String) #

[View source]

Instance Method Detail

def build_metadata(*args, **options) #

[View source]
def build_metadata(*args, **options, &) #

[View source]
def clone #

Returns a copy of self with all instance variables cloned.


[View source]
def limits : Tuple(Limit, Limit) #

[View source]
def major(*args, **options) #

[View source]
def major(*args, **options, &) #

[View source]
def minor(*args, **options) #

[View source]
def minor(*args, **options, &) #

[View source]
def operator : Operator #

[View source]
def patch(*args, **options) #

[View source]
def patch(*args, **options, &) #

[View source]
def pre_compat?(version : Version, allow_prerelease = false) : Bool #

[View source]
def prerelease(*args, **options) #

[View source]
def prerelease(*args, **options, &) #

[View source]
def satisfies?(version : Version, allow_prerelease = false) : Bool #

[View source]
def to_s(io) #

[View source]
def version : Version #

[View source]