lib/infoboxer/tree/table.rb in infoboxer-0.2.1 vs lib/infoboxer/tree/table.rb in infoboxer-0.2.2

- old
+ new

@@ -23,16 +23,16 @@ # For now, returns first table row, if it consists only of # {TableHeading}s. # # FIXME: it can easily be several table heading rows def heading_row - rows.first.children.all?(&call(matches?: TableHeading)) ? + rows.first && rows.first.children.all?(&call(matches?: TableHeading)) ? rows.first : nil end # For now, returns all table rows except {#heading_row} def body_rows - rows.first.children.all?(&call(matches?: TableHeading)) ? + rows.first && rows.first.children.all?(&call(matches?: TableHeading)) ? rows[1..-1] : rows end def text