Class: DocGuard::RecordDocumentationRelevance::Process

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

Overview

Main orchestration class that records the current documentation relevance state by capturing the latest digests of files referenced in the documentation.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config: ::DocGuard::Config.new) ⇒ Process

Initializes the process with the given configuration.

Parameters:



19
20
21
# File 'lib/doc_guard/record_documentation_relevance/process.rb', line 19

def initialize(config: ::DocGuard::Config.new)
  @config = config
end

Class Method Details

.run(config: ::DocGuard::Config.new) ⇒ void

This method returns an undefined value.

Entry point to run the relevance recording process.

Parameters:

  • config (DocGuard::Config) (defaults to: ::DocGuard::Config.new)

    Optional configuration.



12
13
14
# File 'lib/doc_guard/record_documentation_relevance/process.rb', line 12

def self.run(config: ::DocGuard::Config.new)
  new(config: config).call
end

Instance Method Details

#callvoid

This method returns an undefined value.

Executes the full relevance recording pipeline.



26
27
28
29
30
31
32
# File 'lib/doc_guard/record_documentation_relevance/process.rb', line 26

def call
  tracked_files = load_tracked_files
  current_digests = calculate_current_digests(tracked_files)
  recording = record_digests(current_digests)

  report_recording(recording)
end