Module: OAuth2::Version

Defined in:
lib/oauth2/version.rb

Constant Summary collapse

VERSION =
to_s

Class Method Summary collapse

Class Method Details

.majorInteger

The major version

Returns:

  • (Integer)


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

def major
  1
end

.minorInteger

The minor version

Returns:

  • (Integer)


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

def minor
  4
end

.patchInteger

The patch version

Returns:

  • (Integer)


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

def patch
  6
end

.preInteger, NilClass

The pre-release version, if any

Returns:

  • (Integer, NilClass)


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

def pre
  nil
end

.to_aArray

The version number as an array

Returns:

  • (Array)


50
51
52
# File 'lib/oauth2/version.rb', line 50

def to_a
  [major, minor, patch, pre].compact
end

.to_hHash

The version number as a hash

Returns:

  • (Hash)


38
39
40
41
42
43
44
45
# File 'lib/oauth2/version.rb', line 38

def to_h
  {
    :major => major,
    :minor => minor,
    :patch => patch,
    :pre => pre,
  }
end

.to_sString

The version number as a string

Returns:

  • (String)


57
58
59
# File 'lib/oauth2/version.rb', line 57

def to_s
  to_a.join('.')
end