Method: FatTable::Table#to_text
- Defined in:
- lib/fat_table/table.rb
#to_text(options = {}) {|fmt| ... } ⇒ String
Return the table as a string containing ordinary text representing table, passing the +options+ on to the TextFormatter. If no block is given, default formatting applies to the table's cells. If a block is given, it yields a TextFormatter to the block to which formatting instructions and footers can be added by calling methods on it.
1740 1741 1742 1743 1744 |
# File 'lib/fat_table/table.rb', line 1740 def to_text( = {}) fmt = TextFormatter.new(self, **) yield fmt if block_given? fmt.output end |