Class: Textus::Domain::Staleness::GeneratorCheck
- Inherits:
-
Object
- Object
- Textus::Domain::Staleness::GeneratorCheck
- Defined in:
- lib/textus/domain/staleness/generator_check.rb
Overview
Reports staleness for generator-zone entries — derived files whose generator’s listed sources have been modified more recently than the entry’s ‘_meta.generated.at` timestamp. Returns an Array of row hashes (possibly empty) per entry.
Instance Method Summary collapse
-
#initialize(manifest:, file_stat:) ⇒ GeneratorCheck
constructor
A new instance of GeneratorCheck.
- #rows_for(mentry) ⇒ Object
Constructor Details
#initialize(manifest:, file_stat:) ⇒ GeneratorCheck
Returns a new instance of GeneratorCheck.
11 12 13 14 |
# File 'lib/textus/domain/staleness/generator_check.rb', line 11 def initialize(manifest:, file_stat:) @manifest = manifest @file_stat = file_stat end |
Instance Method Details
#rows_for(mentry) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/textus/domain/staleness/generator_check.rb', line 16 def rows_for(mentry) return [] unless applicable?(mentry) path = Textus::Key::Path.resolve(@manifest.data, mentry) reason = stale_reason(mentry, path) reason ? [stale_row(mentry, path, reason)] : [] end |