abstract class Tablo::Cell

Overview

Cell is an abstract class representing a single cell inside a Table. Derived concrete cells are : TextCell and DataCell

Included Modules

Direct Known Subclasses

Defined in:

cell.cr

Instance Method Summary

Instance Method Detail

def alignment #

[View source]
abstract def apply_formatter #

[View source]
abstract def apply_styler(content : String, line_index : Int32) #

[View source]
def formatted_content #

Returns the formatted value of the Cell, after applying the formatter for this Column (but without applying any wrapping or the styler).


[View source]
def formatter #

[View source]
def left_padding #

Common attributes of TextCell and DataCell


[View source]
def line_count #

returns the number of subcells in a cell ie, the number of lines a cell contains

This method is the entry point for all cell computations (formatting, aligning and styling !)


[View source]
def memoized_formatted_content : String | Nil #

Instance variables used for memoization, dynamically initialized later


[View source]
def memoized_formatted_content=(memoized_formatted_content : String | Nil) #

Instance variables used for memoization, dynamically initialized later


[View source]
def memoized_rendered_subcells : Array(String) | Nil #

[View source]
def memoized_rendered_subcells=(memoized_rendered_subcells : Array(String) | Nil) #

[View source]
def padded_truncated_subcells(line_count_max) #

returns an array of formatted and styled subcells, ready to print, adding a truncator characted at the end of the last line, replacing the first character of right padding, if line count is > than iheader_wrap or body_wrap.

called from table.format_row


[View source]
def padding_character #

Common attributes of TextCell and DataCell


[View source]
abstract def real_alignment #

[View source]
def right_padding #

Common attributes of TextCell and DataCell


[View source]
def styler #

[View source]
def truncation_indicator #

[View source]
def value #

Common attributes of TextCell and DataCell


[View source]
def width #

[View source]
def width=(width) #

[View source]
def wrap_mode #

[View source]