Module: Metasploit::Model::Version

Defined in:
lib/metasploit/model/version.rb

Overview

Holds components of VERSION as defined by semantic versioning v2.0.0.

Constant Summary collapse

MAJOR =

The major version number.

1
MINOR =

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

0
PATCH =

The patch version number, scoped to the MAJOR and MINOR version numbers.

1

Class Method Summary collapse

Class Method Details

.fullString

The full version string, including the MAJOR, MINOR, PATCH, and optionally, the Metasploit::Model::Version::PRERELEASE in the semantic versioning v2.0.0 format.

Returns:



28
29
30
31
32
33
34
35
36
# File 'lib/metasploit/model/version.rb', line 28

def self.full
  version = "#{MAJOR}.#{MINOR}.#{PATCH}"

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

  version
end

.gemString

The full gem version string, including the MAJOR, MINOR, PATCH, and optionally, the Metasploit::Model::Version::PRERELEASE in the RubyGems versioning format.

Returns:



46
47
48
# File 'lib/metasploit/model/version.rb', line 46

def self.gem
  full.gsub('-', '.pre.')
end