class OTX::Indicator::IP::Malware

Public Class Methods

new(attributes={}) click to toggle source
# File lib/otx_ruby/types/ip/malware.rb, line 5
def initialize(attributes={})
  attributes.each do |key, value|
    if key == 'hash'
      self.class.send(:attr_accessor, 'malware_hash')
      send('malware_hash=', value)
    else
      unless self.respond_to?(key)
        self.class.send(:attr_accessor, key)
      end
      send("#{key.downcase}=", value)
    end
  end
end