Module: StorageGuardian
- Defined in:
- lib/storage_guardian.rb,
lib/storage_guardian/budget.rb,
lib/storage_guardian/report.rb,
lib/storage_guardian/scanner.rb,
lib/storage_guardian/cold_detector.rb,
lib/storage_guardian/bloat_detector.rb,
lib/storage_guardian/duplicate_detector.rb
Defined Under Namespace
Classes: BloatDetector, Budget, ColdDetector, DuplicateDetector, Entry, Error, Report, Scanner
Class Method Summary collapse
Class Method Details
.scan(path, budget: nil, cold_threshold_days: 90) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/storage_guardian.rb', line 13 def self.scan(path, budget: nil, cold_threshold_days: 90) budget ||= Budget.new scanner = Scanner.new(path) entries = scanner.scan duplicates = DuplicateDetector.new(entries).detect bloat = BloatDetector.new(entries, budget).detect cold = ColdDetector.new(entries, cold_threshold_days).detect Report.new(path, entries, duplicates, bloat, cold) end |