Module: Hanami::Version Private
- Defined in:
- lib/hanami/version.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Hanami version
Constant Summary collapse
- VERSION =
"2.1.1"
Class Method Summary collapse
- .gem_requirement ⇒ Object private
- .major_minor ⇒ Object private
- .prerelease? ⇒ Boolean private
- .version ⇒ Object private
Class Method Details
.gem_requirement ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
20 21 22 23 24 25 26 |
# File 'lib/hanami/version.rb', line 20 def self.gem_requirement if prerelease? version else "~> #{major_minor}" end end |
.major_minor ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
36 37 38 |
# File 'lib/hanami/version.rb', line 36 def self.major_minor version.scan(/\A\d{1,2}\.\d{1,2}/).first end |
.prerelease? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
30 31 32 |
# File 'lib/hanami/version.rb', line 30 def self.prerelease? version =~ /alpha|beta|rc/ end |
.version ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
14 15 16 |
# File 'lib/hanami/version.rb', line 14 def self.version VERSION end |