Method: DataTable::Table#subtotal

Defined in:
lib/data-table/table.rb

#subtotal(column_name, function = nil, index = 0, &block) ⇒ Object



298
299
300
301
# File 'lib/data-table/table.rb', line 298

def subtotal(column_name, function = nil, index = 0, &block)
  raise 'You must supply an index value' if @subtotals.count >= 1 && index.nil?
  total_row @subtotals, column_name, function, index, &block
end