Module: MetasploitDataModels::Version
- Defined in:
- lib/metasploit_data_models/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.
2- PATCH =
9
Class Method Summary collapse
-
.full ⇒ String
The full version string, including the MAJOR, MINOR, PATCH, and optionally, the
MetasploitDataModels::Version::PRERELEASEin the semantic versioning v2.0.0 format. -
.gem ⇒ String
The full gem version string, including the MAJOR, MINOR, PATCH, and optionally, the
MetasploitDataModels::Version::PRERELEASEin the RubyGems versioning format.
Class Method Details
.full ⇒ String
The full version string, including the MAJOR,
MINOR, PATCH, and optionally, the
MetasploitDataModels::Version::PRERELEASE in the
semantic versioning v2.0.0 format.
27 28 29 30 31 32 33 34 35 |
# File 'lib/metasploit_data_models/version.rb', line 27 def self.full version = "#{MAJOR}.#{MINOR}.#{PATCH}" if defined? PRERELEASE version = "#{version}-#{PRERELEASE}" end version end |
.gem ⇒ String
The full gem version string, including the MAJOR,
MINOR, PATCH, and optionally, the
MetasploitDataModels::Version::PRERELEASE in the
RubyGems versioning format.
45 46 47 |
# File 'lib/metasploit_data_models/version.rb', line 45 def self.gem full.gsub('-', '.pre.') end |