Class: SvgConform::Compatibility::ReportFormatter
- Inherits:
-
Object
- Object
- SvgConform::Compatibility::ReportFormatter
- Defined in:
- lib/svg_conform/compatibility/report_formatter.rb
Overview
Handles formatting and display of compatibility analysis results
Instance Method Summary collapse
- #display_batch_results(results) ⇒ Object
- #display_single_file_result(result) ⇒ Object
-
#initialize(context) ⇒ ReportFormatter
constructor
A new instance of ReportFormatter.
- #write_output_file(results) ⇒ Object
Constructor Details
#initialize(context) ⇒ ReportFormatter
Returns a new instance of ReportFormatter.
9 10 11 |
# File 'lib/svg_conform/compatibility/report_formatter.rb', line 9 def initialize(context) @context = context end |
Instance Method Details
#display_batch_results(results) ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/svg_conform/compatibility/report_formatter.rb', line 21 def display_batch_results(results) if @context.semantic_analysis? display_semantic_batch_results(results) else display_basic_batch_results(results) end end |
#display_single_file_result(result) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/svg_conform/compatibility/report_formatter.rb', line 13 def display_single_file_result(result) if @context.semantic_analysis? display_semantic_single_result(result) else display_basic_single_result(result) end end |
#write_output_file(results) ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/svg_conform/compatibility/report_formatter.rb', line 29 def write_output_file(results) return unless @context.file_output? content = generate_output_content(results) File.write(@context.output_file, content) puts "📄 Results written to: #{@context.output_file}" end |