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)


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

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

#build(filter = nil) ⇒ Object



24
25
26
# File 'lib/cucumber/parser/table.rb', line 24

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

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



28
29
30
31
32
33
34
# File 'lib/cucumber/parser/table.rb', line 28

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