Method: OCI::ThreatIntelligence::Models::EntityReference#initialize

Defined in:
lib/oci/threat_intelligence/models/entity_reference.rb

#initialize(attributes = {}) ⇒ EntityReference

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):

  • :type (String)

    The value to assign to the #type property



61
62
63
64
65
66
67
68
# File 'lib/oci/threat_intelligence/models/entity_reference.rb', line 61

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  self.type = attributes[:'type'] if attributes[:'type']
end