Class: CvssSuite::InvalidCvss
- Defined in:
- lib/cvss_suite/invalid_cvss.rb
Overview
This class represents a invalid CVSS vector.
Instance Attribute Summary
Attributes inherited from Cvss
Instance Method Summary collapse
-
#base_score ⇒ Object
Since this is an invalid CVSS vector, it always throws an exception.
-
#environmental_score ⇒ Object
Since this is an invalid CVSS vector, it always throws an exception.
-
#initialize(vector = nil) ⇒ InvalidCvss
constructor
rubocop:disable Lint/MissingSuper.
-
#overall_score ⇒ Object
Since this is an invalid CVSS vector, it always throws an exception.
-
#temporal_score ⇒ Object
Since this is an invalid CVSS vector, it always throws an exception.
-
#valid? ⇒ Boolean
Since this is an invalid CVSS vector, it always returns false.
-
#version ⇒ Object
Since this is an invalid CVSS vector, it always throws an exception.
Methods inherited from Cvss
Constructor Details
#initialize(vector = nil) ⇒ InvalidCvss
rubocop:disable Lint/MissingSuper
Creates a new invalid CVSS vector, remembering the vector that was
rejected so the error it raises can name it. Cannot call super: that
parses the vector, which is the thing that already failed.
Deliberately not stored as @vector: #vector reads that through to_s, and .new accepts any object, so an object with a hostile to_s would turn a total reader into one that raises.
21 22 23 |
# File 'lib/cvss_suite/invalid_cvss.rb', line 21 def initialize(vector = nil) @rejected = vector end |
Instance Method Details
#base_score ⇒ Object
Since this is an invalid CVSS vector, it always throws an exception.
40 41 42 |
# File 'lib/cvss_suite/invalid_cvss.rb', line 40 def base_score check_validity end |
#environmental_score ⇒ Object
Since this is an invalid CVSS vector, it always throws an exception.
52 53 54 |
# File 'lib/cvss_suite/invalid_cvss.rb', line 52 def environmental_score check_validity end |
#overall_score ⇒ Object
Since this is an invalid CVSS vector, it always throws an exception.
58 59 60 |
# File 'lib/cvss_suite/invalid_cvss.rb', line 58 def overall_score check_validity end |
#temporal_score ⇒ Object
Since this is an invalid CVSS vector, it always throws an exception.
46 47 48 |
# File 'lib/cvss_suite/invalid_cvss.rb', line 46 def temporal_score check_validity end |
#valid? ⇒ Boolean
Since this is an invalid CVSS vector, it always returns false.
28 29 30 |
# File 'lib/cvss_suite/invalid_cvss.rb', line 28 def valid? false end |
#version ⇒ Object
Since this is an invalid CVSS vector, it always throws an exception.
34 35 36 |
# File 'lib/cvss_suite/invalid_cvss.rb', line 34 def version check_validity end |