Module: Cuprum::Collections::Version Private

Defined in:
lib/cuprum/collections/version.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

The current version of the gem.

See Also:

Constant Summary collapse

MAJOR =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Major version.

0
MINOR =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Minor version.

4
PATCH =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Patch version.

0
PRERELEASE =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Prerelease version.

nil
BUILD =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Build metadata.

nil

Class Method Summary collapse

Class Method Details

.to_gem_versionObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Generates the gem version string from the Version constants.

Inlined here because dependencies may not be loaded when processing a gemspec, which results in the user being unable to install the gem for the first time.

See Also:

  • SleepingKingStudios::Tools::SemanticVersion#to_gem_version


30
31
32
33
34
35
36
37
38
39
40
# File 'lib/cuprum/collections/version.rb', line 30

def to_gem_version
  str = +"#{MAJOR}.#{MINOR}.#{PATCH}"

  prerelease = value_of(:PRERELEASE)
  str << ".#{prerelease}" if prerelease

  build = value_of(:BUILD)
  str << ".#{build}" if build

  str
end