Class: Bridgetown::LiquidRenderer::Table
- Inherits:
-
Object
- Object
- Bridgetown::LiquidRenderer::Table
- 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
-
#initialize(stats) ⇒ Table
constructor
A new instance of Table.
-
#to_s(num_of_rows = 50) ⇒ Object
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 |