Module: Enumerable

Defined in:
lib/github_issue_stats.rb

Overview

Extend Enumberable classes with a to_markdown_table method

Instance Method Summary collapse

Instance Method Details

#to_markdown_table(options = {}) ⇒ Object



25
26
27
28
29
# File 'lib/github_issue_stats.rb', line 25

def to_markdown_table(options = {})
  table = Text::Table.new :rows => self.to_a.dup
  table.head = table.rows.shift
  table.to_markdown
end