class CvssSuite::Cvss31
This class represents a CVSS vector in version 3.1.
Public Instance Methods
base_score()
click to toggle source
Returns the Base Score of the CVSS vector.
# File lib/cvss_suite/cvss31/cvss31.rb, line 31 def base_score check_validity Cvss31Helper.round_up(@base.score) end
environmental_score()
click to toggle source
Returns the Environmental Score of the CVSS vector.
# File lib/cvss_suite/cvss31/cvss31.rb, line 46 def environmental_score return temporal_score unless @environmental.valid? Cvss31Helper.round_up(@environmental.score(@base, @temporal)) end
temporal_score()
click to toggle source
Returns the Temporal Score of the CVSS vector.
# File lib/cvss_suite/cvss31/cvss31.rb, line 39 def temporal_score Cvss31Helper.round_up(Cvss31Helper.round_up(@base.score) * @temporal.score) end
version()
click to toggle source
Returns the Version of the CVSS vector.
# File lib/cvss_suite/cvss31/cvss31.rb, line 24 def version 3.1 end
Private Instance Methods
init_metrics()
click to toggle source
# File lib/cvss_suite/cvss31/cvss31.rb, line 54 def init_metrics @base = Cvss31Base.new(@properties) @temporal = Cvss31Temporal.new(@properties) @environmental = Cvss31Environmental.new(@properties) end