Sha256: 123a516227409a4bdf4dc75d6549c3908347f3b3364ac48da6c84762da9c5459

Contents?: true

Size: 457 Bytes

Versions: 42

Compression:

Stored size: 457 Bytes

Contents

# frozen_string_literal: true

require "json"

module Mihari
  module Emitters
    class StandardOutput < Base
      def valid?
        true
      end

      def emit(title:, description:, artifacts:, source:, tags:)
        h = {
          title: title,
          description: description,
          artifacts: artifacts.map(&:data),
          source: source,
          tags: tags
        }
        puts JSON.pretty_generate(h)
      end
    end
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
mihari-3.12.0 lib/mihari/emitters/stdout.rb
mihari-3.11.0 lib/mihari/emitters/stdout.rb
mihari-3.10.1 lib/mihari/emitters/stdout.rb
mihari-3.10.0 lib/mihari/emitters/stdout.rb
mihari-3.9.2 lib/mihari/emitters/stdout.rb
mihari-3.9.1 lib/mihari/emitters/stdout.rb
mihari-3.9.0 lib/mihari/emitters/stdout.rb
mihari-3.8.1 lib/mihari/emitters/stdout.rb
mihari-3.8.0 lib/mihari/emitters/stdout.rb
mihari-3.7.2 lib/mihari/emitters/stdout.rb
mihari-3.7.1 lib/mihari/emitters/stdout.rb
mihari-3.7.0 lib/mihari/emitters/stdout.rb
mihari-3.6.1 lib/mihari/emitters/stdout.rb
mihari-3.6.0 lib/mihari/emitters/stdout.rb
mihari-3.5.0 lib/mihari/emitters/stdout.rb
mihari-3.4.1 lib/mihari/emitters/stdout.rb
mihari-3.4.0 lib/mihari/emitters/stdout.rb
mihari-3.3.0 lib/mihari/emitters/stdout.rb
mihari-3.2.0 lib/mihari/emitters/stdout.rb
mihari-3.1.0 lib/mihari/emitters/stdout.rb