class Prawn::Table::Cells

def transform_spec(spec, first, total)


or column 0.
first row/column is indicated by +first+; this value is considered row
negative indices to be positive, given a total size of +total+. The
can be compared against a row or column number using ===. Normalizes
Transforms +spec+, a column / row specification, into an object that
def transform_spec(spec, first, total)
  case spec
  when Range
    transform_spec(spec.begin, first, total) ..
      transform_spec(spec.end, first, total)
  when Integer
    spec < 0 ? (first + total + spec) : first + spec
  when Enumerable
    spec.map { |x| first + x }
  else # pass through
    raise "Don't understand spec #{spec.inspect}"
  end
end