Class: Appydave::Tools::Jump::Formatters::TableFormatter
- Defined in:
- lib/appydave/tools/jump/formatters/table_formatter.rb
Overview
Table formatter for human-readable terminal output with colors
Constant Summary collapse
- COLORS =
ANSI color codes
{ reset: "\e[0m", bold: "\e[1m", dim: "\e[2m", red: "\e[31m", green: "\e[32m", yellow: "\e[33m", blue: "\e[34m", magenta: "\e[35m", cyan: "\e[36m", white: "\e[37m" }.freeze
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#format ⇒ String
Format data as a colored table.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Appydave::Tools::Jump::Formatters::Base
Instance Method Details
#format ⇒ String
Format data as a colored table
26 27 28 29 30 31 32 |
# File 'lib/appydave/tools/jump/formatters/table_formatter.rb', line 26 def format return format_error unless success? return format_info if info_result? return format_empty if results.empty? format_results end |