Class: Hirb::Helpers::MarkdownTable
- Defined in:
- lib/hirb/helpers/markdown_table.rb
Overview
Creates a markdown table for github
Constant Summary collapse
- CHARS =
{ :top => {:left => '', :center => '', :right => '', :horizontal => '', :vertical => {:outside => '|', :inside => ' | '} }, :middle => {:left => '|', :center => ' | ', :right => '|', :horizontal => '-'}, :bottom => {:left => '', :center => '', :right => '', :horizontal => '', :vertical => {:outside => '|', :inside => ' | '} } }
Constants inherited from Table
Table::BORDER_LENGTH, Table::MIN_FIELD_LENGTH
Instance Attribute Summary
Attributes inherited from Table
#field_lengths, #fields, #max_fields, #width
Class Method Summary collapse
Methods inherited from Table
#actual_width, #array_to_indices_hash, #call_filter, #chars, choose_style, #default_field_lengths, #enforce_field_constraints, #filter_values, #format_cell, #format_values, #initialize, #render, #render_border, #render_footer, #render_header, #render_rows, #render_table_description, #render_table_header, #set_fields, #set_filter_defaults, #set_headers, #set_rows, #setup_field_lengths, #validate_values
Constructor Details
This class inherits a constructor from Hirb::Helpers::Table
Class Method Details
.render(rows, options = {}) ⇒ Object
11 12 13 |
# File 'lib/hirb/helpers/markdown_table.rb', line 11 def self.render(rows, ={}) new(rows, ).render end |