Class: DocGuard::RecordDocumentationRelevance::Subprocesses::RecordDigests
- Inherits:
-
Object
- Object
- DocGuard::RecordDocumentationRelevance::Subprocesses::RecordDigests
- Defined in:
- lib/doc_guard/record_documentation_relevance/subprocesses/record_digests.rb
Overview
Records the current file digests into a configured file path.
Class Method Summary collapse
-
.run(digests: {}, config: ::DocGuard::Config.new) ⇒ Hash{Symbol => Symbol, Object}
Writes the given digests as pretty-printed JSON to the configured file path.
Class Method Details
.run(digests: {}, config: ::DocGuard::Config.new) ⇒ Hash{Symbol => Symbol, Object}
Writes the given digests as pretty-printed JSON to the configured file path.
18 19 20 21 22 23 |
# File 'lib/doc_guard/record_documentation_relevance/subprocesses/record_digests.rb', line 18 def self.run(digests: {}, config: ::DocGuard::Config.new) File.write(config.digests_store_file_path, JSON.pretty_generate(digests)) { status: :ok } rescue StandardError => error { status: :error, error: error } end |