Class: CvssSuite::Cvss40AllUp
- Inherits:
-
CvssMetric
- Object
- CvssMetric
- CvssSuite::Cvss40AllUp
- Defined in:
- lib/cvss_suite/cvss40/cvss40_all_up.rb
Overview
This class represents all CVSS metrics combined in version 4.0.
Instance Attribute Summary
Attributes inherited from CvssMetric
Instance Method Summary collapse
-
#initialize(properties, base, threat, environmental, environmental_security, supplemental) ⇒ Cvss40AllUp
constructor
A new instance of Cvss40AllUp.
-
#score ⇒ Object
Returns score of this metric.
Methods inherited from CvssMetric
Constructor Details
#initialize(properties, base, threat, environmental, environmental_security, supplemental) ⇒ Cvss40AllUp
Returns a new instance of Cvss40AllUp.
21 22 23 24 25 26 27 28 29 |
# File 'lib/cvss_suite/cvss40/cvss40_all_up.rb', line 21 def initialize(properties, base, threat, environmental, environmental_security, supplemental) @properties_to_later_initialize_from = properties @base = base @threat = threat @environmental = environmental @environmental_security = environmental_security @supplemental = supplemental super(properties) end |
Instance Method Details
#score ⇒ Object
Returns score of this metric
17 18 19 |
# File 'lib/cvss_suite/cvss40/cvss40_all_up.rb', line 17 def score Cvss40CalcHelper.new(@properties.map { |p| [p.abbreviation, p.selected_value[:abbreviation]] }.to_h).score end |