class Cucumber::MultilineArgument::DataTable::Cells
Represents a row of cells or columns of cells
def [](index)
def [](index) @cells[index] end
def accept(visitor)
def accept(visitor) return if Cucumber.wants_to_quit each do |cell| visitor.visit_table_cell(cell) end nil end
def dom_id
def dom_id "row_#{line}" end
def each(&proc)
def each(&proc) @cells.each(&proc) end
def index
def index @table.index(self) end
def initialize(table, cells)
def initialize(table, cells) @table = table @cells = cells end
def line
def line @cells[0].line end
def to_hash
def to_hash @to_hash ||= @table.cells_to_hash(self) end
def to_sexp
def to_sexp [:row, line, *@cells.map(&:to_sexp)] end
def value(index)
def value(index) self[index].value end
def width
def width map { |cell| cell.value ? escape_cell(cell.value.to_s).unpack('U*').length : 0 }.max end