Module: Cucumber::Parser::Table::Table0

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

Instance Method Summary collapse

Instance Method Details

#at_line?(line) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/cucumber/parser/table.rb', line 17

def at_line?(line)
  elements.detect{|table_row| table_row.at_line?(line)}
end

#build(filter = nil) ⇒ Object



21
22
23
# File 'lib/cucumber/parser/table.rb', line 21

def build(filter=nil)
  Ast::Table.new(raw)
end

#raw(filter = nil, scenario_outline = nil) ⇒ Object



25
26
27
28
29
30
31
# File 'lib/cucumber/parser/table.rb', line 25

def raw(filter=nil, scenario_outline=nil)
  elements.map do |table_row|
    if(filter.nil? || table_row == elements[0] || filter.at_line?(table_row) || (scenario_outline && filter.outline_at_line?(scenario_outline)))
      table_row.build
    end
  end.compact
end