class CvssSuite::Cvss3
This class represents a CVSS vector in version 3.0.
Public Instance Methods
base_score()
click to toggle source
Returns the Base Score of the CVSS vector.
# File lib/cvss_suite/cvss3/cvss3.rb, line 28 def base_score check_validity Cvss3Helper.round_up(@base.score) end
environmental_score()
click to toggle source
Returns the Environmental Score of the CVSS vector.
# File lib/cvss_suite/cvss3/cvss3.rb, line 41 def environmental_score return temporal_score unless @environmental.valid? Cvss3Helper.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/cvss3/cvss3.rb, line 35 def temporal_score Cvss3Helper.round_up(Cvss3Helper.round_up(@base.score) * @temporal.score) end
version()
click to toggle source
Returns the Version of the CVSS vector.
# File lib/cvss_suite/cvss3/cvss3.rb, line 22 def version 3.0 end
Private Instance Methods
init_metrics()
click to toggle source
# File lib/cvss_suite/cvss3/cvss3.rb, line 49 def init_metrics @base = Cvss3Base.new(@properties) @temporal = Cvss3Temporal.new(@properties) @environmental = Cvss3Environmental.new(@properties) end