lib/rspreadsheet/row.rb in rspreadsheet-0.4.3 vs lib/rspreadsheet/row.rb in rspreadsheet-0.4.4

- old
+ new

@@ -94,10 +94,17 @@ # Inserts row above itself (and shifts itself and all following rows down) def add_row_above parent.add_row_above(rowi) end + def next_row; relative(+1) end + alias :next :next_row + + def relative(rowi_offset) + worksheet.row(self.rowi+rowi_offset) + end + # @!group Private methods, which should not be called directly # @private # shifts internal represetation of row by diff. This should not be called directly # by user, it is only used by XMLTiedArray_WithRepeatableItems as hook when shifting around rows def _shift_by(diff) @@ -112,6 +119,6 @@ # @!group XMLTiedItem related methods and extensions def xml_options; {:xml_items_node_name => 'table-row', :xml_repeated_attribute => 'number-rows-repeated'} end end -end \ No newline at end of file +end