Contains the pre-release version related to this semantic version
Creates a new Prerelease
instance with supplied array of identifiers
Parses a Prerelease
from the given pre-release version string
The comparison operator.
Array of identifiers that make up the pre-release metadata
Returns the string representation of this semantic version's pre-release metadata
Comparable(SemanticVersion::Prerelease)
Struct
Value
Object
Object
Creates a new Prerelease
instance with supplied array of identifiers
Parses a Prerelease
from the given pre-release version string
require "semantic_version" prerelease = SemanticVersion::Prerelease.parse("rc.1.3") prerelease # => SemanticVersion::Prerelease(@identifiers=["rc", 1, 3])
The comparison operator.
Returns -1
, 0
or 1
depending on whether self
's pre-release is lower than other's, equal to other's pre-release or greater than other's pre-release.
require "semantic_version" prerelease1 = SemanticVersion::Prerelease.new(["rc", 1]) prerelease2 = SemanticVersion::Prerelease.new(["rc", 1, 2]) prerelease1 <=> prerelease2 # => -1 prerelease1 <=> prerelease1 # => 0 prerelease2 <=> prerelease1 # => 1
Array of identifiers that make up the pre-release metadata
Returns the string representation of this semantic version's pre-release metadata
require "semantic_version" semver = SemanticVersion.parse("0.27.1-rc.1") semver.prerelease.to_s # => "rc.1"
© 2012–2020 Manas Technology Solutions.
Licensed under the Apache License, Version 2.0.
https://crystal-lang.org/api/0.35.1/SemanticVersion/Prerelease.html