class TTY::Table::Operation::Padding
A class responsible for padding field with whitespace
Used internally by {Table::Renderer}
Attributes
padding[R]
Public Class Methods
Public Instance Methods
call(field, *)
click to toggle source
Apply padding to a field
@param [TTY::Table::Field] field
the table field
@param [Integer] row
the field row index
@param [Integer] col
the field column index
@return [TTY::Table::Field]
@api public
# File lib/tty/table/operation/padding.rb, line 36 def call(field, *) Strings.pad(field.content, padding) end