Module: OAuth2::Version
- Defined in:
- lib/oauth2/version.rb
Class Method Summary collapse
-
.major ⇒ Integer
The major version.
-
.minor ⇒ Integer
The minor version.
-
.patch ⇒ Integer
The patch version.
-
.pre ⇒ Integer, NilClass
The pre-release version, if any.
-
.to_a ⇒ Array
The version number as an array.
-
.to_h ⇒ Hash
The version number as a hash.
-
.to_s ⇒ String
The version number as a string.
Class Method Details
.major ⇒ Integer
The major version
8 9 10 |
# File 'lib/oauth2/version.rb', line 8 def major 1 end |
.minor ⇒ Integer
The minor version
15 16 17 |
# File 'lib/oauth2/version.rb', line 15 def minor 4 end |
.patch ⇒ Integer
The patch version
22 23 24 |
# File 'lib/oauth2/version.rb', line 22 def patch 1 end |
.pre ⇒ Integer, NilClass
The pre-release version, if any
29 30 31 |
# File 'lib/oauth2/version.rb', line 29 def pre nil end |
.to_a ⇒ Array
The version number as an array
48 49 50 |
# File 'lib/oauth2/version.rb', line 48 def to_a [major, minor, patch, pre].compact end |
.to_h ⇒ Hash
The version number as a hash
36 37 38 39 40 41 42 43 |
# File 'lib/oauth2/version.rb', line 36 def to_h { :major => major, :minor => minor, :patch => patch, :pre => pre, } end |
.to_s ⇒ String
The version number as a string
55 56 57 |
# File 'lib/oauth2/version.rb', line 55 def to_s to_a.join('.') end |