Class: Jekyll::LiquidRenderer::Table

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

Instance Method Summary collapse

Constructor Details

#initialize(stats) ⇒ Table

Returns a new instance of Table.



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

def initialize(stats)
  @stats = stats
end

Instance Method Details

#to_s(num_of_rows = 50) ⇒ Object



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

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