Module: CheckPlease::Printers
- Defined in:
- lib/check_please/printers.rb,
lib/check_please/printers/base.rb,
lib/check_please/printers/json.rb,
lib/check_please/printers/long.rb,
lib/check_please/printers/table_print.rb
Defined Under Namespace
Classes: Base, JSON, Long, TablePrint
Constant Summary collapse
- PRINTERS_BY_FORMAT =
{ table: Printers::TablePrint, json: Printers::JSON, long: Printers::Long, }
- FORMATS =
PRINTERS_BY_FORMAT.keys.sort
- DEFAULT_FORMAT =
:table
Class Method Summary collapse
Class Method Details
.render(diffs, flags = {}) ⇒ Object
17 18 19 20 21 |
# File 'lib/check_please/printers.rb', line 17 def self.render(diffs, flags = {}) flags = Flags.reify(flags) printer = PRINTERS_BY_FORMAT[flags.format] printer.render(diffs) end |