Class: OTX::Indicator::CorrelationRule
- Inherits:
-
Type::Base
- Object
- Type::Base
- OTX::Indicator::CorrelationRule
- Defined in:
- lib/otx_ruby/types/correlation_rule.rb
Instance Attribute Summary
Attributes inherited from Type::Base
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ CorrelationRule
constructor
A new instance of CorrelationRule.
Constructor Details
#initialize(attributes = {}) ⇒ CorrelationRule
Returns a new instance of CorrelationRule.
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/otx_ruby/types/correlation_rule.rb', line 4 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 |