Class: WindClutter::CLI::Commands::Analysis::Traverse
- Inherits:
-
Dry::CLI::Command
- Object
- Dry::CLI::Command
- WindClutter::CLI::Commands::Analysis::Traverse
- Includes:
- WindClutter, Util
- Defined in:
- lib/windclutter/cli/commands/analysis.rb
Overview
Perform full traversal analysis
Constant Summary
Constants included from WindClutter
Instance Method Summary collapse
Instance Method Details
#call(suffix:, **options) ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/windclutter/cli/commands/analysis.rb', line 49 def call(suffix:, **) full = .fetch(:full) suffixes = suffix.split(',') collect_count = full ? 0 : .fetch(:collect).to_i puts "Analysing #{suffix}...".yellow total, scanned, file_count = Analyser.traverse(suffixes, collect_count) puts "Traversed #{file_count} #{suffix} file(s)... 🎉".green ap scanned return unless collect_count.positive? && (total - collect_count).positive? puts "...and #{total - collect_count} more".yellow end |