Class: DocGuard::RecordDocumentationRelevance::Subprocesses::ReportRecording

Inherits:
Object
  • Object
show all
Defined in:
lib/doc_guard/record_documentation_relevance/subprocesses/report_recording.rb

Overview

Outputs a message confirming the result of the documentation state recording.

Class Method Summary collapse

Class Method Details

.run(recording: {}) ⇒ void

This method returns an undefined value.

Runs the subprocess that reports the result of recording digests.

Parameters:

  • recording (Hash{Symbol => Symbol, Object}) (defaults to: {})

    Status result:

    • On success: { status: :ok }

    • On failure: { status: :error, error: error_object }



14
15
16
17
18
19
20
21
22
23
24
# File 'lib/doc_guard/record_documentation_relevance/subprocesses/report_recording.rb', line 14

def self.run(recording: {})
  case recording[:status]
  when :ok
    puts "✅ Documentation state recorded successfully."
  when :error
    warn "‼️ Failed to record documentation state: #{recording[:error].message}"
    exit(1)
  else
    warn "⚠️ Unknown recording status."
  end
end