Class: Threatinator::Event
- Inherits:
-
Model::Base
- Object
- Model::Base
- Threatinator::Event
- Defined in:
- lib/threatinator/event.rb
Constant Summary collapse
- VALID_TYPES =
Set.new([:c2, :attacker, :malware_host, :spamming, :scanning, :phishing])
Instance Attribute Summary collapse
-
#feed_name ⇒ Object
readonly
Returns the value of attribute feed_name.
-
#feed_provider ⇒ Object
readonly
Returns the value of attribute feed_provider.
-
#fqdns ⇒ Object
readonly
Returns the value of attribute fqdns.
-
#ipv4s ⇒ Object
readonly
Returns the value of attribute ipv4s.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#urls ⇒ Object
readonly
Returns the value of attribute urls.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Event
constructor
A new instance of Event.
Methods inherited from Model::Base
Constructor Details
#initialize(opts = {}) ⇒ Event
Returns a new instance of Event.
28 29 30 31 32 33 34 35 36 |
# File 'lib/threatinator/event.rb', line 28 def initialize(opts = {}) @feed_provider = opts[:feed_provider] @feed_name = opts[:feed_name] @type = opts[:type] @ipv4s = Threatinator::Model::Observables::Ipv4Collection.new(opts[:ipv4s] || []) @fqdns = Threatinator::Model::Observables::FqdnCollection.new(opts[:fqdns] || []) @urls = Threatinator::Model::Observables::UrlCollection.new(opts[:urls] || []) super() end |
Instance Attribute Details
#feed_name ⇒ Object (readonly)
Returns the value of attribute feed_name.
11 12 13 |
# File 'lib/threatinator/event.rb', line 11 def feed_name @feed_name end |
#feed_provider ⇒ Object (readonly)
Returns the value of attribute feed_provider.
11 12 13 |
# File 'lib/threatinator/event.rb', line 11 def feed_provider @feed_provider end |
#fqdns ⇒ Object (readonly)
Returns the value of attribute fqdns.
11 12 13 |
# File 'lib/threatinator/event.rb', line 11 def fqdns @fqdns end |
#ipv4s ⇒ Object (readonly)
Returns the value of attribute ipv4s.
11 12 13 |
# File 'lib/threatinator/event.rb', line 11 def ipv4s @ipv4s end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
11 12 13 |
# File 'lib/threatinator/event.rb', line 11 def type @type end |
#urls ⇒ Object (readonly)
Returns the value of attribute urls.
11 12 13 |
# File 'lib/threatinator/event.rb', line 11 def urls @urls end |