class Tryouts::CLI::FormatterFactory
def self.create_formatter(options = {})
def self.create_formatter(options = {}) # Map boolean flags to format symbols if format not explicitly set format = options[:format]&.to_sym || determine_format_from_flags(options) # Create base formatter first base_formatter = case format when :verbose if options[:fails_only] VerboseFailsFormatter.new(options) else VerboseFormatter.new(options) end when :compact if options[:fails_only] CompactFailsFormatter.new(options) else CompactFormatter.new(options) end when :quiet if options[:fails_only] QuietFailsFormatter.new(options) else QuietFormatter.new(options) end else CompactFormatter.new(options) # Default to compact end # Return base formatter - live status is now handled by OutputManager/LiveStatusManager base_formatter end