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

Since:

  • 0.9.0

Constant Summary collapse

VERSION =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Since:

  • 0.9.0

'1.3.4'.freeze

Class Method Summary collapse

Class Method Details

.gem_requirementObject

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.

Since:

  • 0.9.0



19
20
21
22
23
24
25
# File 'lib/hanami/version.rb', line 19

def self.gem_requirement
  if prerelease?
    version
  else
    "~> #{major_minor}"
  end
end

.major_minorObject

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.

Since:

  • 0.9.0



35
36
37
# File 'lib/hanami/version.rb', line 35

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.

Returns:

  • (Boolean)

Since:

  • 0.9.0



29
30
31
# File 'lib/hanami/version.rb', line 29

def self.prerelease?
  version =~ /alpha|beta|rc/
end

.versionObject

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.

Since:

  • 0.9.0



13
14
15
# File 'lib/hanami/version.rb', line 13

def self.version
  VERSION
end