Sha256: 3fd69646397b876429e30a4dcac4e1c8b24c4948e32cd3200b6103a250651567

Contents?: true

Size: 694 Bytes

Versions: 24

Compression:

Stored size: 694 Bytes

Contents

# frozen_string_literal: true

module Mihari
  module Services
    class AlertDestroyer < Service
      #
      # @param [String] id
      #
      def call(id)
        Models::Alert.find(id).destroy
      end
    end

    class ArtifactDestroyer < Service
      #
      # @param [Integer] id
      #
      def call(id)
        Models::Artifact.find(id).destroy
      end
    end

    class RuleDestroyer < Service
      #
      # @param [String] id
      #
      def call(id)
        Models::Rule.find(id).destroy
      end
    end

    class TagDestroyer < Service
      #
      # @param [Integer] id
      #
      def call(id)
        Models::Tag.find(id).destroy
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
mihari-8.0.2 lib/mihari/services/destroyers.rb
mihari-8.0.1 lib/mihari/services/destroyers.rb
mihari-8.0.0 lib/mihari/services/destroyers.rb
mihari-7.6.4 lib/mihari/services/destroyers.rb
mihari-7.6.3 lib/mihari/services/destroyers.rb
mihari-7.6.2 lib/mihari/services/destroyers.rb
mihari-7.6.1 lib/mihari/services/destroyers.rb
mihari-7.6.0 lib/mihari/services/destroyers.rb
mihari-7.5.0 lib/mihari/services/destroyers.rb
mihari-7.4.0 lib/mihari/services/destroyers.rb
mihari-7.3.2 lib/mihari/services/destroyers.rb
mihari-7.3.1 lib/mihari/services/destroyers.rb
mihari-7.3.0 lib/mihari/services/destroyers.rb
mihari-7.2.0 lib/mihari/services/destroyers.rb
mihari-7.1.3 lib/mihari/services/destroyers.rb
mihari-7.1.2 lib/mihari/services/destroyers.rb
mihari-7.1.1 lib/mihari/services/destroyers.rb
mihari-7.1.0 lib/mihari/services/destroyers.rb
mihari-7.0.5 lib/mihari/services/destroyers.rb
mihari-7.0.4 lib/mihari/services/destroyers.rb