Module: Cucumber::Parser::Table::TableRow2

Defined in:
lib/cucumber/parser/table.rb

Instance Method Summary collapse

Instance Method Details

#at_line?(line) ⇒ Boolean

Returns:

  • (Boolean)


82
83
84
# File 'lib/cucumber/parser/table.rb', line 82

def at_line?(line)
  cells.line == line
end

#buildObject



86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/cucumber/parser/table.rb', line 86

def build
  row = cells.elements.map do |elt| 
    value = elt.cell.text_value.strip
    value.empty? ? nil : value
  end

  class << row
    attr_accessor :line
  end
  row.line = cells.line

  row
end