Class: SolidQueueGuard::Formatters::Terminal Private

Inherits:
Object
  • Object
show all
Defined in:
lib/solid_queue_guard/formatters/terminal.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Constant Summary collapse

ICONS =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{ pass: '', warn: '⚠️', fail: '', skip: '⏭️' }.freeze

Instance Method Summary collapse

Constructor Details

#initialize(report) ⇒ Terminal

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Terminal.



9
10
11
# File 'lib/solid_queue_guard/formatters/terminal.rb', line 9

def initialize(report)
  @report = report
end

Instance Method Details

#renderObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



13
14
15
16
17
18
19
20
21
22
23
# File 'lib/solid_queue_guard/formatters/terminal.rb', line 13

def render
  [
    'SolidQueueGuard Report',
    '',
    "Status: #{report.status.to_s.upcase}",
    '',
    'Checks:',
    *check_lines,
    *suggestion_lines
  ].join("\n")
end