Class: Textus::Store::Freshness::DriftDetector
- Inherits:
-
Object
- Object
- Textus::Store::Freshness::DriftDetector
- Defined in:
- lib/textus/store/freshness/drift_detector.rb
Instance Method Summary collapse
- #drift_rows(mentry) ⇒ Object
-
#initialize(manifest:, file_stat:, clock:) ⇒ DriftDetector
constructor
A new instance of DriftDetector.
Constructor Details
#initialize(manifest:, file_stat:, clock:) ⇒ DriftDetector
Returns a new instance of DriftDetector.
9 10 11 12 13 |
# File 'lib/textus/store/freshness/drift_detector.rb', line 9 def initialize(manifest:, file_stat:, clock:) @manifest = manifest @file_stat = file_stat @clock = clock end |
Instance Method Details
#drift_rows(mentry) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/textus/store/freshness/drift_detector.rb', line 15 def drift_rows(mentry) return [] unless mentry.external? path = Textus::Key::Path.resolve(@manifest.data, mentry) reason = drift_reason(mentry, path) reason ? [drift_row(mentry, path, reason)] : [] end |