module Metasploit::Version::Version

Holds components of {VERSION} as defined by {semver.org/spec/v2.0.0.html semantic versioning v2.0.0}.

Constants

MAJOR

The major version number.

MINOR

The minor version number, scoped to the {MAJOR} version number.

PATCH

The patch number, scoped to the {MINOR} version number.

Public Class Methods

full() click to toggle source

The full version string, including the {Metasploit::Version::Version::MAJOR}, {Metasploit::Version::Version::MINOR}, {Metasploit::Version::Version::PATCH}, and optionally, the ‘Metasploit::Version::Version::PRERELEASE` in the {semver.org/spec/v2.0.0.html semantic versioning v2.0.0} format.

@return [String] ‘{Metasploit::Version::Version::MAJOR}.{Metasploit::Version::Version::MINOR}.{Metasploit::Version::Version::PATCH}’ on master.

'{Metasploit::Version::Version::MAJOR}.{Metasploit::Version::Version::MINOR}.{Metasploit::Version::Version::PATCH}-PRERELEASE'
on any branch other than master.
# File lib/metasploit/version/version.rb, line 28
def self.full
  version = "#{MAJOR}.#{MINOR}.#{PATCH}"

  if defined? PRERELEASE
    version = "#{version}-#{PRERELEASE}"
  end

  version
end
gem() click to toggle source

The full gem version string, including the {Metasploit::Version::Version::MAJOR}, {Metasploit::Version::Version::MINOR}, {Metasploit::Version::Version::PATCH}, and optionally, the ‘Metasploit::Version::Version::PRERELEASE` in the {guides.rubygems.org/specification-reference/#version RubyGems versioning} format.

@return [String] ‘{Metasploit::Version::Version::MAJOR}.{Metasploit::Version::Version::MINOR}.{Metasploit::Version::Version::PATCH}’

on master.  '{Metasploit::Version::Version::MAJOR}.{Metasploit::Version::Version::MINOR}.{Metasploit::Version::Version::PATCH}.PRERELEASE'
on any branch other than master.
# File lib/metasploit/version/version.rb, line 46
def self.gem
  full.gsub('-', '.pre.')
end