Module: Cucumber::Parser::Table::Table0
- Defined in:
- lib/cucumber/parser/table.rb
Instance Method Summary collapse
- #at_line?(line) ⇒ Boolean
- #build(filter = nil) ⇒ Object
- #raw(filter = nil, scenario_outline = nil) ⇒ Object
Instance Method Details
#at_line?(line) ⇒ Boolean
22 23 24 |
# File 'lib/cucumber/parser/table.rb', line 22 def at_line?(line) elements.detect{|table_row| table_row.at_line?(line)} end |
#build(filter = nil) ⇒ Object
26 27 28 |
# File 'lib/cucumber/parser/table.rb', line 26 def build(filter=nil) Ast::Table.new(raw) end |
#raw(filter = nil, scenario_outline = nil) ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/cucumber/parser/table.rb', line 30 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 |