Class: ActiveStix::EmailAddress

Inherits:
ApplicationRecord show all
Defined in:
app/models/active_stix/email_address.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_eml(eml) ⇒ Object

after_create_commit do

assign_iddentity_to_group

end



12
13
14
15
16
17
18
19
20
21
# File 'app/models/active_stix/email_address.rb', line 12

def self.from_eml(eml)
  eml.correspondences.all.collect do |c|
    {
        "type": "email-address",
        "value": c.email.address,
        "display_name": c.email.alias,
        "from_ref": c.agent.id
    }
  end
end

Instance Method Details

#assign_identity_to_groupObject



23
24
25
# File 'app/models/active_stix/email_address.rb', line 23

def assign_identity_to_group

end