Class: SkillBench::Cli::ResultPrinter

Inherits:
Object
  • Object
show all
Defined in:
lib/skill_bench/cli/result_printer.rb

Overview

Prints the result of a ‘skill-bench run` command.

Class Method Summary collapse

Class Method Details

.call(result, format: :human) ⇒ Integer

Prints the result and returns the appropriate exit code.

Parameters:

  • result (Hash)

    Result from ScoringService

  • format (Symbol) (defaults to: :human)

    Output format (:human, :json, :junit)

Returns:

  • (Integer)

    Exit code (0 for pass, 1 for fail)



14
15
16
17
# File 'lib/skill_bench/cli/result_printer.rb', line 14

def self.call(result, format: :human)
  puts OutputFormatter.format(result, format: format)
  OutputFormatter.exit_code(result)
end