Class: ActiveStix::Artifact
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- ActiveStix::Artifact
- Defined in:
- app/models/active_stix/artifact.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.create_from_eml(eml) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'app/models/active_stix/artifact.rb', line 14 def self.create_from_eml(eml) mail = Mail.new(eml) artifact = Artifact.new artifact.mime_type = mail.mime_type artifact.payload_bin = eml artifact.save artifact end |
Instance Method Details
#type ⇒ Object
8 9 10 |
# File 'app/models/active_stix/artifact.rb', line 8 def type return "artifact" end |