Class: Jekyll::LiquidRenderer::Table

Inherits:
Object
  • Object
show all
Defined in:
lib/jekyll/liquid_renderer/table.rb

Instance Method Summary collapse

Constructor Details

#initialize(stats) ⇒ Table

Returns a new instance of Table.



5
6
7
# File 'lib/jekyll/liquid_renderer/table.rb', line 5

def initialize(stats)
  @stats = stats
end

Instance Method Details

#to_s(num_of_rows = 50) ⇒ Object



9
10
11
12
13
# File 'lib/jekyll/liquid_renderer/table.rb', line 9

def to_s(num_of_rows = 50)
  data = data_for_table(num_of_rows)
  widths = table_widths(data)
  generate_table(data, widths)
end