Class: Mihari::Emitters::TheHive
- Defined in:
- lib/mihari/emitters/the_hive.rb
Instance Attribute Summary collapse
-
#the_hive ⇒ Object
readonly
Returns the value of attribute the_hive.
Instance Method Summary collapse
- #emit(title:, description:, artifacts:, tags: []) ⇒ Object
-
#initialize ⇒ TheHive
constructor
A new instance of TheHive.
- #valid? ⇒ true, false
Methods inherited from Base
Constructor Details
Instance Attribute Details
#the_hive ⇒ Object (readonly)
Returns the value of attribute the_hive.
6 7 8 |
# File 'lib/mihari/emitters/the_hive.rb', line 6 def the_hive @the_hive end |
Instance Method Details
#emit(title:, description:, artifacts:, tags: []) ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/mihari/emitters/the_hive.rb', line 17 def emit(title:, description:, artifacts:, tags: []) return if artifacts.empty? the_hive.alert.create( title: title, description: description, artifacts: artifacts.map(&:to_h), tags: ) end |
#valid? ⇒ true, false
13 14 15 |
# File 'lib/mihari/emitters/the_hive.rb', line 13 def valid? the_hive.valid? end |