Class: OTX::Indicator::IP::General
- Inherits:
-
Type::Base
- Object
- Type::Base
- OTX::Indicator::IP::General
- Defined in:
- lib/otx_ruby/types/ip/general.rb
Instance Attribute Summary
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.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/otx_ruby/types/ip/general.rb', line 5 def initialize(attributes={}) attributes.each do |key, value| unless self.respond_to?(key) self.class.send(:attr_accessor, key) end if key == 'pulse_info' send("#{key.downcase}=", OTX::Indicator::CVE::PulseInfo.new(value)) elsif key == 'base_indicator' send("#{key.downcase}=", OTX::Indicator::CVE::BaseIndicator.new(value)) else send("#{key.downcase}=", value) end end end |