Method: Text::Table::Cell#to_s

Defined in:
lib/text-table/cell.rb

#to_sObject

:nodoc:



26
27
28
29
30
31
32
33
34
35
# File 'lib/text-table/cell.rb', line 26

def to_s #:nodoc:
([' ' * table.horizontal_padding]*2).join case align
  when :left
    value.ljust cell_width
  when :right
    value.rjust cell_width
  when :center
    value.center cell_width
  end
end