table builder: add 'striped' css class by default.

This commit is contained in:
evazion
2020-01-06 02:12:04 -06:00
parent abe7f086b6
commit f1528e0fae
20 changed files with 22 additions and 22 deletions

View File

@@ -24,10 +24,10 @@ class TableBuilder
attr_reader :columns, :table_attributes, :items
def initialize(items, table_attributes=nil)
def initialize(items, **table_attributes)
@items = items
@columns = []
@table_attributes = table_attributes
@table_attributes = { class: "striped", **table_attributes }
yield self if block_given?
end