Class: Pvectl::Formatters::Wide
- Defined in:
- lib/pvectl/formatters/wide.rb
Overview
Formats data as a wide table with extended columns.
For collections: uses wide_columns and to_wide_row from presenter. For single resources (describe): delegates to Table (no wide variant).
Instance Method Summary collapse
-
#format(data, presenter, color_enabled: true, describe: false, **context) ⇒ String
Formats data as wide table output.
Instance Method Details
#format(data, presenter, color_enabled: true, describe: false, **context) ⇒ String
Formats data as wide table output.
28 29 30 31 32 33 34 35 36 |
# File 'lib/pvectl/formatters/wide.rb', line 28 def format(data, presenter, color_enabled: true, describe: false, **context) # For describe (single resource), delegate to Table formatter # Wide format has no meaning for vertical key-value layout if describe || !collection?(data) Table.new.format(data, presenter, color_enabled: color_enabled, describe: true, **context) else format_wide_table(data, presenter, color_enabled, **context) end end |