Method: Prawn::Table::CellProxy#rows
- Defined in:
- lib/prawn/table/accessors.rb
#rows(row_spec) ⇒ Object Also known as: row
Limits selection to the given row or rows. row_spec can be anything that responds to the === operator selecting a set of 0-based row numbers; most commonly a number or a range.
table.row(0) # selects first row
table.rows(3..4) # selects rows four and five
67 68 69 |
# File 'lib/prawn/table/accessors.rb', line 67 def rows(row_spec) CellProxy.new(@cells.select { |c| row_spec === c.row }) end |