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)


79
80
81
# File 'lib/cucumber/parser/table.rb', line 79

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

#buildObject



83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'lib/cucumber/parser/table.rb', line 83

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