struct

Athena::Console::Helper::Table::CellStyle

Inherits Struct / Value / Object

Represents the styling for a specific ACON::Helper::Table::Cell.

Constructors

new(foreground : String = "default", background : String = "default", align : ACON::Helper::Table::Alignment = :left, format : String | Nil = nil)
Source

Instance methods

align

How the text should be aligned in the cell.

See ACON::Helper::Table::Alignment.

Source
background

Returns the background color for this cell.

Can be any color string supported via [ACON::Formatter::OutputStyleInterface][Athena::Console::Formatter::OutputStyleInterface--inline-styles], e.g. named ("red") or hexadecimal ("#38bdc2") colors.

Source
foreground

Returns the foreground color for this cell.

Can be any color string supported via [ACON::Formatter::OutputStyleInterface][Athena::Console::Formatter::OutputStyleInterface--inline-styles], e.g. named ("red") or hexadecimal ("#38bdc2") colors.

Source
format

A sprintf format string representing the content of the cell. Should have a single %s representing the cell's value.

Can be used to reuse [custom style tags][Athena::Console::Formatter::OutputStyleInterface--custom-styles]. E.g. "<fire>%s</>".

Source