class CVESchema::CVE::Impact::CVSSv3::TM

Constants

E
RC
RL

Attributes

e[R]

Exploit Code Maturity.

@return [:X, :H, :F, :P, :U]

rc[R]

Report Confidence.

@return [:X, :C, :R, :U]

rl[R]

Remediation Level.

@return [:X, :U, :W, :T, :O]

Public Class Methods

from_json(json) click to toggle source

Maps the parsed JSON to the 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_v3.rb, line 174
def self.from_json(json)
  {
    e:  E[json['E']],
    rl: RL[json['RL']],
    rc: RC[json['RC']]
  }
end
load(json) click to toggle source

Loads the TM object from the parsed JSON.

@param [Hash{String => Object}] json

The parsed JSON.

@return [TM]

The loaded TM object.
# File lib/cve_schema/cve/impact/cvss_v3.rb, line 191
def self.load(json)
  new(**from_json(json))
end
new(e: nil, rl: nil, rc: nil) click to toggle source

Initializes the TM object.

# 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