Class: OTX::Indicator::CVE::General
- Inherits:
-
Type::Base
- Object
- Type::Base
- OTX::Indicator::CVE::General
- Defined in:
- lib/otx_ruby/types/cve.rb
Instance Attribute Summary collapse
-
#base_indicator ⇒ Object
Needs details for attributes.
-
#date_modified ⇒ Object
Needs details for attributes.
-
#indicator ⇒ Object
Needs details for attributes.
-
#pulse_info ⇒ Object
Needs details for attributes.
-
#references ⇒ Object
Needs details for attributes.
Attributes inherited from Type::Base
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ General
constructor
A new instance of General.
Constructor Details
#initialize(attributes = {}) ⇒ General
Returns a new instance of General.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# 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 |
Instance Attribute Details
#base_indicator ⇒ Object
Needs details for attributes
8 9 10 |
# File 'lib/otx_ruby/types/cve.rb', line 8 def base_indicator @base_indicator end |
#date_modified ⇒ Object
Needs details for attributes
8 9 10 |
# File 'lib/otx_ruby/types/cve.rb', line 8 def date_modified @date_modified end |
#indicator ⇒ Object
Needs details for attributes
8 9 10 |
# File 'lib/otx_ruby/types/cve.rb', line 8 def indicator @indicator end |
#pulse_info ⇒ Object
Needs details for attributes
8 9 10 |
# File 'lib/otx_ruby/types/cve.rb', line 8 def pulse_info @pulse_info end |
#references ⇒ Object
Needs details for attributes
8 9 10 |
# File 'lib/otx_ruby/types/cve.rb', line 8 def references @references end |