Sha256: 88ac7b3359c9e73daf553d07be3c09777f7b0e04b6b3edd7b0da353347e6121b

Contents?: true

Size: 422 Bytes

Versions: 27

Compression:

Stored size: 422 Bytes

Contents

# frozen_string_literal: true

require "json"

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

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

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
mihari-0.7.0 lib/mihari/emitters/stdout.rb
mihari-0.6.0 lib/mihari/emitters/stdout.rb
mihari-0.5.2 lib/mihari/emitters/stdout.rb
mihari-0.5.1 lib/mihari/emitters/stdout.rb
mihari-0.5.0 lib/mihari/emitters/stdout.rb
mihari-0.4.2 lib/mihari/emitters/stdout.rb
mihari-0.4.0 lib/mihari/emitters/stdout.rb