Module: Attribool::Version
- Defined in:
- lib/attribool/version.rb
Overview
Module that contains all gem version information. Follows semantic versioning. Read: semver.org/
Constant Summary collapse
- MAJOR =
Major version.
2
- MINOR =
Minor version.
0
- PATCH =
Patch version.
5
Class Method Summary collapse
-
.to_a ⇒ Array<Integer>
Version as [MAJOR, MINOR, PATCH].
-
.to_h ⇒ Hash
Version as {major: MAJOR, minor: MINOR, patch: PATCH}.
-
.to_s ⇒ String
Version as
MAJOR.MINOR.PATCH
.
Class Method Details
.to_a ⇒ Array<Integer>
Version as [MAJOR, MINOR, PATCH]
32 33 34 |
# File 'lib/attribool/version.rb', line 32 def to_a [MAJOR, MINOR, PATCH] end |
.to_h ⇒ Hash
Version as {major: MAJOR, minor: MINOR, patch: PATCH}
48 49 50 |
# File 'lib/attribool/version.rb', line 48 def to_h %i[major minor patch].zip(to_a).to_h end |
.to_s ⇒ String
Version as MAJOR.MINOR.PATCH
40 41 42 |
# File 'lib/attribool/version.rb', line 40 def to_s to_a.join(".") end |