Class: Mihari::Emitters::StandardOutput

Inherits:
Base
  • Object
show all
Defined in:
lib/mihari/emitters/stdout.rb

Instance Method Summary collapse

Methods inherited from Base

inherited, #run

Methods included from Retriable

#retry_on_error

Methods included from Configurable

#config_keys, #configuration_status, #configured?

Instance Method Details

#emit(title:, description:, artifacts:, source:, tags:) ⇒ Object



12
13
14
15
16
17
18
19
20
21
# File 'lib/mihari/emitters/stdout.rb', line 12

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

#valid?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/mihari/emitters/stdout.rb', line 8

def valid?
  true
end