class Text::Table

Extend Text::Table with markdown support. Taken from github.com/aptinio/text-table/pull/10

Public Instance Methods

to_markdown() click to toggle source
# File lib/github_issue_stats.rb, line 11
def to_markdown
  b = @boundary_intersection
  @boundary_intersection = '|'
  rendered_rows = [separator] + text_table_rows.map(&:to_s)
  rendered_rows.unshift [text_table_head.to_s] if head
  @boundary_intersection = b
  rendered_rows.join.gsub('|--', '| :').gsub('--|', ': |')
end