Class: CVEList::MalformedCVE
- Inherits:
-
Object
- Object
- CVEList::MalformedCVE
- Defined in:
- lib/cvelist/malformed_cve.rb
Overview
Represents malformed/invalid CVE JSON that could not be loaded.
Instance Attribute Summary collapse
-
#exception ⇒ StandardError
readonly
The exception encountered when parsing the JSON file.
-
#path ⇒ String
readonly
Path to the JSON file.
Instance Method Summary collapse
-
#initialize(path, exception) ⇒ MalformedCVE
constructor
Initializes the malformed json.
-
#to_s ⇒ String
Converts the malformed JSON back into a String.
Constructor Details
#initialize(path, exception) ⇒ MalformedCVE
Initializes the malformed json.
26 27 28 29 |
# File 'lib/cvelist/malformed_cve.rb', line 26 def initialize(path,exception) @path = path @exception = exception end |
Instance Attribute Details
#exception ⇒ StandardError (readonly)
The exception encountered when parsing the JSON file.
15 16 17 |
# File 'lib/cvelist/malformed_cve.rb', line 15 def exception @exception end |
#path ⇒ String (readonly)
Path to the JSON file.
10 11 12 |
# File 'lib/cvelist/malformed_cve.rb', line 10 def path @path end |
Instance Method Details
#to_s ⇒ String
Converts the malformed JSON back into a String.
37 38 39 |
# File 'lib/cvelist/malformed_cve.rb', line 37 def to_s "#{@path}: #{@exception.class}: #{@exception.}" end |