Class: Equilibrium::Commands::AnalyzeCommand
- Inherits:
-
Object
- Object
- Equilibrium::Commands::AnalyzeCommand
- Includes:
- Mixins::ErrorHandling, Mixins::InputOutput
- Defined in:
- lib/equilibrium/commands/analyze_command.rb
Overview
Command for analyzing expected vs actual tags with unified structure
Instance Method Summary collapse
-
#execute(options = {}) ⇒ Object
Execute the analyze command.
Methods included from Mixins::InputOutput
#format_output, #read_input_data
Methods included from Mixins::ErrorHandling
Instance Method Details
#execute(options = {}) ⇒ Object
Execute the analyze command
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/equilibrium/commands/analyze_command.rb', line 21 def execute( = {}) with_error_handling do # Load and validate data files expected_data = load_and_validate_json_file([:expected], error_prefix: "Expected data schema validation failed") actual_data = load_and_validate_json_file([:actual], error_prefix: "Actual data schema validation failed") # Perform analysis analysis = Analyzer.analyze(expected_data, actual_data) # Validate output schema SchemaValidator.validate!(analysis, Equilibrium::Schemas::ANALYZER_OUTPUT, error_prefix: "Analyzer output schema validation failed") # Format and display output format_output(analysis, [:format] || "summary", "analysis") end end |