Sha256: 17697a49766c0e12869c358f8e62a88f0cd8977ad8a2b61f4bbda9e9be6df2a3
Contents?: true
Size: 628 Bytes
Versions: 46
Compression:
Stored size: 628 Bytes
Contents
# frozen_string_literal: true module Mihari module Emitters class Database < Base def valid? true end def emit(title:, description:, artifacts:, source:, tags: []) return if artifacts.empty? tags = tags.filter_map { |name| Tag.find_or_create_by(name: name) }.uniq taggings = tags.map { |tag| Tagging.new(tag_id: tag.id) } alert = Alert.new( title: title, description: description, artifacts: artifacts, source: source, taggings: taggings ) alert.save alert end end end end
Version data entries
46 entries across 46 versions & 1 rubygems