class OTX::Indicator::CVE::General
Attributes
base_indicator[RW]
Needs details for attributes
date_modified[RW]
Needs details for attributes
indicator[RW]
Needs details for attributes
pulse_info[RW]
Needs details for attributes
references[RW]
Needs details for attributes
Public Class Methods
new(attributes={})
click to toggle source
# File lib/otx_ruby/types/cve.rb, line 10 def initialize(attributes={}) attributes.each do |key, value| _key = key.gsub('-', '_') unless self.respond_to?(key) self.class.send(:attr_accessor, key) end if _key == 'pulse_info' @pulse_info = OTX::Indicator::CVE::PulseInfo.new(value) elsif _key == 'base_indicator' @base_indicator = OTX::Indicator::CVE::BaseIndicator.new(value) elsif _key == 'references' @references = [] value.each do |reference| @references << OTX::Indicator::CVE::Reference.new(reference) end else send("#{_key.downcase}=", value) end end end