Module: Mailgun::Tracking::Version
- Defined in:
- lib/mailgun/tracking/version.rb
Overview
The module which hold version data.
Constant Summary collapse
- KEYS =
%i[major minor patch].freeze
- DOT =
'.'
Class Method Summary collapse
-
.major ⇒ Integer
Major version.
-
.minor ⇒ Integer
Minor version.
-
.patch ⇒ Integer
Patch version.
-
.to_a ⇒ Array
Return an array representation of version.
-
.to_h ⇒ Hash
Return a hash representation of version.
-
.to_s ⇒ String
Return a string representation of version.
Class Method Details
.major ⇒ Integer
Major version.
15 16 17 |
# File 'lib/mailgun/tracking/version.rb', line 15 def major 3 end |
.minor ⇒ Integer
Minor version.
22 23 24 |
# File 'lib/mailgun/tracking/version.rb', line 22 def minor 0 end |
.patch ⇒ Integer
Patch version.
29 30 31 |
# File 'lib/mailgun/tracking/version.rb', line 29 def patch 0 end |
.to_a ⇒ Array
Return an array representation of version.
43 44 45 |
# File 'lib/mailgun/tracking/version.rb', line 43 def to_a [major, minor, patch] end |
.to_h ⇒ Hash
Return a hash representation of version.
36 37 38 |
# File 'lib/mailgun/tracking/version.rb', line 36 def to_h ::Hash[KEYS.zip(to_a)] end |
.to_s ⇒ String
Return a string representation of version.
50 51 52 |
# File 'lib/mailgun/tracking/version.rb', line 50 def to_s to_a.join(DOT) end |