Sha256: 9728c7598bc57496e01ec4ae4ba8335efd380ab092a32f4485737c3b94d66b01

Contents?: true

Size: 473 Bytes

Versions: 1

Compression:

Stored size: 473 Bytes

Contents

# frozen_string_literal: true

module Mihari
  module Services
    #
    # Alert runner
    #
    class AlertRunner < Service
      # @return [Mihari::Services::AlertProxy]
      attr_reader :alert

      def initialize(alert)
        super()

        @alert = alert
      end

      #
      # @return [Mihari::Models::Alert]
      #
      def call
        emitter = Emitters::Database.new(rule: alert.rule)
        emitter.call alert.artifacts
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mihari-5.7.0 lib/mihari/services/alert_runner.rb