Tabulo v2.0.0 Release Notes
-
๐ New features
- ๐ New
border
option forTabulo::Table
initializer allows for better customization of border and divider characters, using a preset list of options, viz.::ascii
,:modern
,:markdown
,:blank
and:classic
. In particular, the:modern
border option uses smoothly drawn Unicode line characters; and the:markdown
option renders a GitHub-flavoured Markdown table. Tabulo::Table#horizontal_rule
method accepts:top
,:bottom
and:middle
options to allow the appropriate border characters to be used depending on its intended position in the table.- When iterating a
Tabulo::Row
, it's now possible to get the formatted string value of an individualTabulo::Cell
, not just its underlying "raw" value. - ๐ง Column padding can now optionally be configured separately for left and right column sides, by
passing a 2-element Array to the
column_padding
option of theTabulo::Table
initializer.
๐ฅ Breaking changes
- A
Tabulo::Row
is now a collection ofTabulo::Cell
, not a collection of underlying "raw" values. This makes it easier to get at both formatted string values and underlying "raw" values ofCell
s when traversing aRow
. To get at the raw underlying value, callTabulo::Cell#value
. - โ Remove deprecated
columns
option fromTabulo::Table
initializer (existingcols
positional parameter now renamed tocolumns
). - โ Remove deprecated
shrinkwrap!
method (usepack
instead). - 0๏ธโฃ By default, table now has a border line at the bottom. Pass
:classic
to theborder
option of theTabulo::Table
initializer to get the old behaviour. - Removal of
horizontal_rule_character
,vertical_rule_character
andintersection
character options fromTabulo::Table
initializer, and fromTabulo::Table#transpose
method. Use theborder
option instead.
Other noteworthy changes
- โ Test coverage is now at exactly 100%
hirb
gem now mentioned in README
- ๐ New