Class: Cucumber::Ast::OutlineTable::ExampleCells

Inherits:
Cells
  • Object
show all
Defined in:
lib/cucumber/ast/outline_table.rb

Instance Method Summary collapse

Instance Method Details

#accept(visitor) ⇒ Object



53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# File 'lib/cucumber/ast/outline_table.rb', line 53

def accept(visitor)
  if header?
    @cells.each do |cell|
      cell.status = :skipped_param
      visitor.visit_table_cell(cell)
    end
  else
    visitor.step_mother.before_and_after(self) do
      @step_invocations.each do |step_invocation|
        step_invocation.invoke(visitor.step_mother, visitor.options)
        @exception ||= step_invocation.exception
      end

      @cells.each do |cell|
        visitor.visit_table_cell(cell)
      end
    end
  end
end

#create_step_invocations!(scenario_outline) ⇒ Object



39
40
41
# File 'lib/cucumber/ast/outline_table.rb', line 39

def create_step_invocations!(scenario_outline)
  @step_invocations = scenario_outline.step_invocations(self)
end

#descend?(visitor) ⇒ Boolean

Returns:

  • (Boolean)


43
44
45
# File 'lib/cucumber/ast/outline_table.rb', line 43

def descend?(visitor)
  @table.matches?(visitor, self)
end

#skip_invoke!Object



47
48
49
50
51
# File 'lib/cucumber/ast/outline_table.rb', line 47

def skip_invoke!
  @step_invocations.each do |step_invocation|
    step_invocation.skip_invoke!
  end
end