class OTX::Indicator::CVE::PulseInfo

Public Class Methods

new(attributes={}) click to toggle source
# File lib/otx_ruby/types/pulse_info.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 != 'pulses'
      send("#{key.downcase}=", value)
    else
      @pulses = []
      value.each do |pulse|
        @pulses << OTX::Pulse.new(pulse)
      end
    end
  end
end