Module: Camdram::Version

Defined in:
lib/camdram/version.rb

Class Method Summary collapse

Class Method Details

.majorInteger

Returns the major revision number of the Camdram Ruby client library in use

Returns:

  • (Integer)

    The major revision number.


10
11
12
# File 'lib/camdram/version.rb', line 10

def major
  2
end

.minorInteger

Return the minor revision number of the Camdram Ruby client library in use

Returns:

  • (Integer)

    The minor revision number.


17
18
19
# File 'lib/camdram/version.rb', line 17

def minor
  0
end

.patchInteger

Returns the patch revision number of the Camdram Ruby client library in use

Returns:

  • (Integer)

    The patch revision number.


24
25
26
# File 'lib/camdram/version.rb', line 24

def patch
  0
end

.to_aArray

Returns the version array of the Camdram Ruby client library in use

Returns:

  • (Array)

    The version formatted as an array.


38
39
40
# File 'lib/camdram/version.rb', line 38

def to_a
  [major, minor, patch]
end

.to_hHash

Returns the version hash of the Camdram Ruby client library in use

Returns:

  • (Hash)

    The version formatted as a hash.


45
46
47
48
49
50
51
# File 'lib/camdram/version.rb', line 45

def to_h
  {
    major: major,
    minor: minor,
    patch: patch,
  }
end

.to_sString

Returns the version string of the Camdram Ruby client library in use

Returns:

  • (String)

    The version formatted as a string.


31
32
33
# File 'lib/camdram/version.rb', line 31

def to_s
  "#{major}.#{minor}.#{patch}".freeze
end