Class: Mihari::Services::AlertGetter

Inherits:
Mihari::Service show all
Defined in:
lib/mihari/services/getters.rb

Instance Method Summary collapse

Methods inherited from Mihari::Service

call, #result, result

Instance Method Details

#call(id) ⇒ Mihari::Models::Artifact

Parameters:

  • id (Integer)

Returns:



28
29
30
31
32
33
# File 'lib/mihari/services/getters.rb', line 28

def call(id)
  Mihari::Models::Alert.eager_load(
    :artifacts,
    rule: :tags
  ).find id
end