lib/tty/table/border/null.rb in tty-0.0.7 vs lib/tty/table/border/null.rb in tty-0.0.8

- old
+ new

@@ -5,37 +5,42 @@ class Border # A class that represents no border. class Null < Border + def_border do + center SPACE_CHAR + end + # A stub top line # # @api private def top_line - nil + border ? super : nil end # A stub separator line # # @api private def separator - nil + return [] if border.separator == EACH_ROW + border ? super : nil end # A line spanning all columns delemited by space character. # # @return [String] # # @api private def row_line - row.join(' ') + (border && !border.characters.empty?) ? super : row.join(SPACE_CHAR) end # A stub bottom line # # @api private def bottom_line - nil + border ? super : nil end end # Null end # Border end # Table