Method: Marktable::Tables::Markdown#initialize

Defined in:
lib/marktable/tables/markdown.rb

#initialize(table, headers) ⇒ Markdown

Returns a new instance of Markdown.

Parameters:

  • [String] (table)

    The markdown table string.

  • [boolean] (headers)

    Whether the table has headers or not. If nil, it will be inferred from the table content.



11
12
13
14
# File 'lib/marktable/tables/markdown.rb', line 11

def initialize(table, headers)
  @headers_flag = headers
  @markdown_rows = extract_rows(table)
end