Module: Semverve::Version

Defined in:
lib/semverve/version.rb

Overview

Module that contains all gem version information. Follows semantic versioning. Read: https://semver.org/

Constant Summary collapse

MAJOR =

Major version.

Returns:

  • (Integer)
0
MINOR =

Minor version.

Returns:

  • (Integer)
3
PATCH =

Patch version.

Returns:

  • (Integer)
0

Class Method Summary collapse

Class Method Details

.to_aArray<Integer>

Version as [MAJOR, MINOR, PATCH]

Returns:

  • (Array<Integer>)


32
33
34
# File 'lib/semverve/version.rb', line 32

def to_a
  [MAJOR, MINOR, PATCH]
end

.to_sString

Version as MAJOR.MINOR.PATCH

Returns:

  • (String)


40
41
42
# File 'lib/semverve/version.rb', line 40

def to_s
  to_a.join(".")
end