class RPM::Version
- RPM::Version
- Reference
- Object
Included Modules
- Comparable(RPM::Version)
Defined in:
rpm/version.crConstructors
Class Method Summary
Instance Method Summary
-
#<=>(other : Version) : Int32
Compare to other versions.
- #e : UInt32?
-
#hash
Generates an
UInt64
hash value for this object. - #newer?(other : Version)
- #older?(other : Version)
- #r : String?
-
#to_s(io)
Equivalent to
#to_vre(io)
-
#to_s
Equivalent to
#to_vre
-
#to_vr(io)
Send the string represents the version and release, to given IO.
-
#to_vr
Returns the string represents the version and release.
-
#to_vre(io)
Send the string represents the version, release and epoch if set, to given IO.
-
#to_vre
Returns the string represents the version, release and epoch if set.
-
#to_vre_epoch_zero(io)
Send the string represents the version, release and epoch where epoch is filled with 0, to given IO.
-
#to_vre_epoch_zero
Returns the string represents the version, release and epoch where epoch is filled with 0.
- #v : String
Constructor Detail
Class Method Detail
Instance Method Detail
Compare to other versions.
If self
is newer, returns 1. If other
is newer, returns -1.
If two versions are equal, returns 0.
If one's epoch is nil
, it will be evaluated as 0 for
comparison. If one's release is nil
, it will be evaluated as
empty string.
NOTE Using the semantic of RPM's rpmVersionCompare
function,
except for the process for nil-releases.
Generates an UInt64
hash value for this object.
This method must have the property that a == b
implies a.hash == b.hash
.
The hash value is used along with ==
by the Hash
class to determine if two objects
reference the same hash key.
Subclasses must not override this method. Instead, they must define hash(hasher)
,
though usually the macro def_hash
can be used to generate this method.
Send the string represents the version, release and epoch where epoch is filled with 0, to given IO.
This method makes a string comparable by single call of
rpmvercomp
function, but it seems to be used for comparing
version and release separately, according to usage in RPM
itself.
Returns the string represents the version, release and epoch where epoch is filled with 0.
This method makes a string comparable by single call of
rpmvercomp
function, but it seems to be used for comparing
version and release separately, according to usage in RPM
itself.