class CVESchema::CVE::Impact::CVSSv2::EM
Constants
- AR
- CDP
- CR
- IR
- TD
Attributes
ar[R]
Security Requirements Availability.
@return [:L, :M, :H, :ND]
cdp[R]
The Collateral Damage Potential.
@return [:N, :L, :LM, :MH, :H, :ND]
cr[R]
Security Requirements Confidentiality.
@return [:L, :M, :H, :ND]
ir[R]
Security Requirements Integrity.
@return [:L, :M, :H, :ND]
td[R]
The Target Distribution.
@return [:N, :L, :M, :H, :ND]
Public Class Methods
from_json(json)
click to toggle source
Maps the parsed JSON to a Symbol Hash for {#initialize}.
@param [Hash{String => Object}] json
The parsed JSON.
@return [Hash{Symbol => Object}]
The mapped Symbol Hash.
# File lib/cve_schema/cve/impact/cvss_v2.rb, line 242 def self.from_json(json) { cdp: CDP[json['CDP']], td: TD[json['TD']], cr: CR[json['CR']], ir: IR[json['IR']], ar: AR[json['AR']] } end
load(json)
click to toggle source
Loads the EM
object from the parsed JSON.
@param [Hash{String => Object}] json
The parsed JSON.
@return [self]
The loaded EM object.
# File lib/cve_schema/cve/impact/cvss_v2.rb, line 261 def self.load(json) new(**from_json(json)) end
new(cdp: nil, td: nil, cr: nil, ir: nil, ar: nil)
click to toggle source
# File lib/cve_schema/cve/impact/cvss_v2.rb, line 225 def initialize(cdp: nil, td: nil, cr: nil, ir: nil, ar: nil) @cdp = cdp @td = td @cr = cr @ir = ir @ar = ar end