Method: ConceptDocFormatter.table_to_s

Defined in:
lib/asker/formatter/concept_doc_formatter.rb

.table_to_s(table) ⇒ Object

Formatter Table to Doc



29
30
31
32
33
34
35
36
# File 'lib/asker/formatter/concept_doc_formatter.rb', line 29

def self.table_to_s(table)
  my_screen_table = Terminal::Table.new do |st|
    st << table.fields
    st << :separator
    table.rows.each { |r| st.add_row r }
  end
  "#{my_screen_table}\n"
end