Module: OpenBEL::Version

Defined in:
app/openbel/api/version.rb

Overview

Captures the version of the OpenBEL API.

Constant Summary collapse

STRING =

The frozen version String. See Object#freeze.

File.read(
  File.join(
    File.expand_path(File.dirname(__FILE__)),
    '..', '..','..',
    'VERSION'
  )
).chomp.freeze
VERSION_NUMBERS =

The frozen Array of version numbers. See Object#freeze.

[MAJOR, MINOR, PATCH].freeze

Class Method Summary collapse

Class Method Details

.to_afrozen Array

Return the frozen, semantic version number Array for the OpenBEL API.

Returns:

  • (frozen Array)

    the semantic version numbers of the OpenBEL API



33
34
35
# File 'app/openbel/api/version.rb', line 33

def to_a
  VERSION_NUMBERS
end

.to_sfrozen String Also known as: to_str

Return the frozen, semantic version String for the OpenBEL API.

Returns:

  • (frozen String)

    the semantic version of the OpenBEL API



26
27
28
# File 'app/openbel/api/version.rb', line 26

def to_s
  STRING
end