Class: CVESchema::CVE::Impact::CVSSv3::TM
- Inherits:
-
Object
- Object
- CVESchema::CVE::Impact::CVSSv3::TM
- Defined in:
- lib/cve_schema/cve/impact/cvss_v3.rb
Constant Summary collapse
- E =
{'X' => :X, 'H' => :H, 'F' => :F, 'P' => :P, 'U' => :U}
- RL =
{'X' => :X, 'U' => :U, 'W' => :W, 'T' => :T, 'O' => :O}
- RC =
{'X' => :X, 'C' => :C, 'R' => :R, 'U' => :U}
Instance Attribute Summary collapse
-
#e ⇒ :X, ...
readonly
Exploit Code Maturity.
-
#rc ⇒ :X, ...
readonly
Report Confidence.
-
#rl ⇒ :X, ...
readonly
Remediation Level.
Class Method Summary collapse
-
.from_json(json) ⇒ Hash{Symbol => Object}
Maps the parsed JSON to the Symbol Hash for #initialize.
-
.load(json) ⇒ TM
Loads the TM object from the parsed JSON.
Instance Method Summary collapse
-
#initialize(e: nil, rl: nil, rc: nil) ⇒ TM
constructor
Initializes the TM object.
Constructor Details
#initialize(e: nil, rl: nil, rc: nil) ⇒ TM
Initializes the TM object.
159 160 161 162 163 |
# File 'lib/cve_schema/cve/impact/cvss_v3.rb', line 159 def initialize(e: nil, rl: nil, rc: nil) @e = e @rl = rl @rc = rc end |
Instance Attribute Details
#e ⇒ :X, ... (readonly)
Exploit Code Maturity.
140 141 142 |
# File 'lib/cve_schema/cve/impact/cvss_v3.rb', line 140 def e @e end |
#rc ⇒ :X, ... (readonly)
Report Confidence.
154 155 156 |
# File 'lib/cve_schema/cve/impact/cvss_v3.rb', line 154 def rc @rc end |
#rl ⇒ :X, ... (readonly)
Remediation Level.
147 148 149 |
# File 'lib/cve_schema/cve/impact/cvss_v3.rb', line 147 def rl @rl end |
Class Method Details
.from_json(json) ⇒ Hash{Symbol => Object}
Maps the parsed JSON to the Symbol Hash for #initialize.
174 175 176 177 178 179 180 |
# File 'lib/cve_schema/cve/impact/cvss_v3.rb', line 174 def self.from_json(json) { e: E[json['E']], rl: RL[json['RL']], rc: RC[json['RC']] } end |
.load(json) ⇒ TM
Loads the TM object from the parsed JSON.
191 192 193 |
# File 'lib/cve_schema/cve/impact/cvss_v3.rb', line 191 def self.load(json) new(**from_json(json)) end |