Learn R Programming

semverutils (version 0.1.0)

semVer: semVer is an R6 class to create an object for working with Semantic versioning

Description

semVer is an R6 class to create an object for working with Semantic versioning

semVer is an R6 class to create an object for working with Semantic versioning

Arguments

Public fields

SemVerVersion

version of semantic versioning rules to be followed currently only version 2.0.0 is supported.

Methods

Public methods

Method higherThanAll()

higherThanAll() test if the vector of versions passed in are all lower than this object

Usage

semVer$higherThanAll(Versions)

Arguments

Versions

character vector of semantically formatted version numbers

Returns

atomic boolean

Examples

sem <- semVer$new("3.0.0")
sem$higherThanAll(c("2.0.2", "0.1.0"))

Method new()

initializes a new semVer object with the version supplied

Usage

semVer$new(Version = "", SemVerVersion = "2.0.0")

Arguments

Version

character of semantically formatted version numbers

SemVerVersion

defaults to "2.0.0" no other options currently available.

Returns

semVer object holding version data

Examples

sem <- semVer$new("3.0.0")

Method clone()

The objects of this class are cloneable with this method.

Usage

semVer$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

Run this code
# NOT RUN {
## ------------------------------------------------
## Method `semVer$higherThanAll`
## ------------------------------------------------

sem <- semVer$new("3.0.0")
sem$higherThanAll(c("2.0.2", "0.1.0"))

## ------------------------------------------------
## Method `semVer$new`
## ------------------------------------------------

sem <- semVer$new("3.0.0")
# }

Run the code above in your browser using DataLab