Class: Cucumber::Tree::RowScenario

Inherits:
BaseScenario show all
Defined in:
lib/gems/cucumber-0.1.15/lib/cucumber/tree/scenario.rb

Direct Known Subclasses

RowScenarioOutline

Instance Attribute Summary collapse

Attributes inherited from BaseScenario

#feature

Instance Method Summary collapse

Methods inherited from BaseScenario

#accept, #at_line?, #file, #outline?, #pending?, #previous_step

Constructor Details

#initialize(feature, template_scenario, values, line) ⇒ RowScenario

Returns a new instance of RowScenario.



157
158
159
160
# File 'lib/gems/cucumber-0.1.15/lib/cucumber/tree/scenario.rb', line 157

def initialize(feature, template_scenario, values, line)
  @feature, @template_scenario, @values, @line = feature, template_scenario, values, line
  template_scenario.update_table_column_widths values
end

Instance Attribute Details

#lineObject (readonly)

Returns the value of attribute line.



155
156
157
# File 'lib/gems/cucumber-0.1.15/lib/cucumber/tree/scenario.rb', line 155

def line
  @line
end

Instance Method Details

#nameObject



166
167
168
# File 'lib/gems/cucumber-0.1.15/lib/cucumber/tree/scenario.rb', line 166

def name
  @template_scenario.name
end

#row?Boolean

Returns:

  • (Boolean)


162
163
164
# File 'lib/gems/cucumber-0.1.15/lib/cucumber/tree/scenario.rb', line 162

def row?
  true
end

#stepsObject

We can only cache steps once the template scenarios steps have been bound in order to know what arity the steps have



171
172
173
174
175
176
177
178
# File 'lib/gems/cucumber-0.1.15/lib/cucumber/tree/scenario.rb', line 171

def steps
  if template_steps_bound?
    @unbound_steps = nil
    @bound_steps ||= build_steps
  else
    @unbound_steps ||= build_steps
  end
end