Class: SentinelRb::Report::Formatter

Inherits:
Object
  • Object
show all
Defined in:
lib/sentinel_rb/report.rb

Overview

Formats analysis results for different output types

Class Method Summary collapse

Class Method Details

.format(results, format: :table, **options) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/sentinel_rb/report.rb', line 7

def self.format(results, format: :table, **options)
  case format.to_sym
  when :table
    TableFormatter.new.format(results, **options)
  when :json
    JsonFormatter.new.format(results, **options)
  when :detailed
    DetailedFormatter.new.format(results, **options)
  else
    raise ArgumentError, "Unsupported format: #{format}"
  end
end