class TTY::Table::Operation::Truncation

@api private
A class responsible for shortening text.

def call(field, row, col)

Other tags:
    Api: - public

Returns:
  • (TTY::Table::Field) -

Parameters:
  • col (Integer) --
  • row (Integer) --
  • field (TTY::Table::Field) --
def call(field, row, col)
  column_width = widths[col] || field.width
  Strings.truncate(field.content, column_width)
end

def initialize(widths)

Other tags:
    Api: - public
def initialize(widths)
  @widths = widths
end