Module: OAuth2::Version
- Defined in:
- lib/oauth2/version.rb
Constant Summary collapse
- VERSION =
to_s
Class Method Summary collapse
-
.major ⇒ Integer
The major version.
-
.minor ⇒ Integer
The minor version.
-
.patch ⇒ Integer
The patch version.
-
.pre ⇒ String, 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
12 13 14 |
# File 'lib/oauth2/version.rb', line 12 def major 1 end |
.minor ⇒ Integer
The minor version
19 20 21 |
# File 'lib/oauth2/version.rb', line 19 def minor 4 end |
.patch ⇒ Integer
The patch version
26 27 28 |
# File 'lib/oauth2/version.rb', line 26 def patch 7 end |
.pre ⇒ String, NilClass
The pre-release version, if any
33 34 35 |
# File 'lib/oauth2/version.rb', line 33 def pre nil end |
.to_a ⇒ Array
The version number as an array
52 53 54 |
# File 'lib/oauth2/version.rb', line 52 def to_a [major, minor, patch, pre].compact end |
.to_h ⇒ Hash
The version number as a hash
40 41 42 43 44 45 46 47 |
# File 'lib/oauth2/version.rb', line 40 def to_h { :major => major, :minor => minor, :patch => patch, :pre => pre, } end |
.to_s ⇒ String
The version number as a string
59 60 61 62 63 |
# File 'lib/oauth2/version.rb', line 59 def to_s v = [major, minor, patch].compact.join('.') v += "-#{pre}" if pre v end |