Class: Bridgetown::LiquidRenderer::Table

Inherits:
Object
  • Object
show all
Defined in:
bridgetown-core/lib/bridgetown-core/liquid_renderer/table.rb

Overview

TODO: deprecate or move to a separate repo/plugin

Constant Summary collapse

GAUGES =
[:count, :bytes, :time].freeze

Instance Method Summary collapse

Constructor Details

#initialize(stats) ⇒ Table

Returns a new instance of Table.



9
10
11
# File 'bridgetown-core/lib/bridgetown-core/liquid_renderer/table.rb', line 9

def initialize(stats)
  @stats = stats
end

Instance Method Details

#to_s(num_of_rows = 50) ⇒ Object



13
14
15
# File 'bridgetown-core/lib/bridgetown-core/liquid_renderer/table.rb', line 13

def to_s(num_of_rows = 50)
  tabulate(data_for_table(num_of_rows))
end