Module: Kaisoku::Reporters::Factory
- Defined in:
- lib/kaisoku/reporters/factory.rb
Class Method Summary collapse
Class Method Details
.build(format, output: $stdout) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/kaisoku/reporters/factory.rb', line 8 def build(format, output: $stdout) case format.to_s when 'console' Console.new(output: output) when 'json' JSON.new(output: output) when 'junit' JUnit.new(output: output) when 'tui' TUI.new(output: output) else raise Error, "unknown reporter: #{format}" end end |