Class: Reviewer::Doctor::Report::Finding

Inherits:
Struct
  • Object
show all
Defined in:
lib/reviewer/doctor/report.rb

Overview

A single diagnostic finding with status, message, and optional detail.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#detailString?

Returns optional detail or guidance text.

Returns:

  • optional detail or guidance text



14
15
16
# File 'lib/reviewer/doctor/report.rb', line 14

Finding = Struct.new(:status, :message, :detail, keyword_init: true) do
  def to_h = { status: status, message: message, detail: detail }.compact
end

#messageString

Returns the finding summary.

Returns:

  • the finding summary



14
15
16
# File 'lib/reviewer/doctor/report.rb', line 14

Finding = Struct.new(:status, :message, :detail, keyword_init: true) do
  def to_h = { status: status, message: message, detail: detail }.compact
end

#statusSymbol

Returns the severity (:ok, :warning, :error, or :info).

Returns:

  • the severity (:ok, :warning, :error, or :info)



14
15
16
# File 'lib/reviewer/doctor/report.rb', line 14

Finding = Struct.new(:status, :message, :detail, keyword_init: true) do
  def to_h = { status: status, message: message, detail: detail }.compact
end

Instance Method Details

#to_hObject



15
# File 'lib/reviewer/doctor/report.rb', line 15

def to_h = { status: status, message: message, detail: detail }.compact