Method: TTY::Table::Field#length
- Defined in:
- lib/tty/table/field.rb
#length ⇒ Integer
If the string contains unescaped new lines then the longest token deterimines the actual field length.
109 110 111 112 113 |
# File 'lib/tty/table/field.rb', line 109 def length (lines.map do |line| Strings::Align.display_width(line) end << 0).max end |