Class: Ace::Docs::CLI::Commands::AnalyzeConsistency

Inherits:
Support::Cli::Command
  • Object
show all
Includes:
ScopeOptions, Support::Cli::Base
Defined in:
lib/ace/docs/cli/commands/analyze_consistency.rb

Overview

ace-support-cli Command class for the analyze-consistency command

This command handles cross-document consistency analysis.

Constant Summary collapse

EXIT_SUCCESS =

Exit codes

0
EXIT_ERROR =
1

Instance Method Summary collapse

Instance Method Details

#call(pattern: nil, **options) ⇒ Object



73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/ace/docs/cli/commands/analyze_consistency.rb', line 73

def call(pattern: nil, **options)
  # Handle --help/-h passed as pattern argument
  if pattern == "--help" || pattern == "-h"
    # ace-support-cli will handle help automatically, so we just ignore
    return EXIT_SUCCESS
  end

  # Type-convert numeric options (ace-support-cli returns strings, Thor converted to integers)
  numeric_options = %i[threshold timeout]
  numeric_options.each do |key|
    options[key] = options[key].to_i if options[key]
  end

  execute_consistency_analysis(pattern, options)
end