Class: Cucumber::Core::Compiler::ScenarioOutlineCompiler

Inherits:
Object
  • Object
show all
Defined in:
lib/cucumber/core/compiler.rb

Instance Method Summary collapse

Constructor Details

#initialize(source, receiver) ⇒ ScenarioOutlineCompiler

Returns a new instance of ScenarioOutlineCompiler.



107
108
109
110
# File 'lib/cucumber/core/compiler.rb', line 107

def initialize(source, receiver)
  @source   = source
  @receiver = receiver
end

Instance Method Details

#examples_table(examples_table, &descend) ⇒ Object



117
118
119
120
121
# File 'lib/cucumber/core/compiler.rb', line 117

def examples_table(examples_table, &descend)
  @examples_table = examples_table
  descend.call(self)
  self
end

#examples_table_row(row) ⇒ Object



123
124
125
126
127
128
129
# File 'lib/cucumber/core/compiler.rb', line 123

def examples_table_row(row)
  steps(row).each do |step|
    receiver.on_step(source + [@examples_table, row, step])
  end
  receiver.on_test_case(source + [@examples_table, row])
  self
end

#outline_step(outline_step) ⇒ Object



112
113
114
115
# File 'lib/cucumber/core/compiler.rb', line 112

def outline_step(outline_step)
  outline_steps << outline_step
  self
end