Class: Turnip::Node::Rule
- Inherits:
-
ScenarioGroupDefinition
- Object
- Base
- ScenarioGroupDefinition
- Turnip::Node::Rule
- Defined in:
- lib/turnip/node/rule.rb
Overview
Note:
Rule metadata generated by Gherkin
{
type: :Rule,
location: { line: 10, column: 3 },
keyword: 'Rule',
name: 'Rule name',
description: 'Rule description',
children: [] # Array of Background, Scenario and Scenario Outline
}
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from ScenarioGroupDefinition
#backgrounds, #description, #keyword, #name, #scenarios
Methods inherited from Base
Methods included from HasLocation
Constructor Details
This class inherits a constructor from Turnip::Node::Base
Instance Method Details
#children ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/turnip/node/rule.rb', line 18 def children @children ||= @raw.children.map do |child| if child.is_a?(CukeModeler::Background) next Background.new(child) end if child.is_a?(CukeModeler::Scenario) next Scenario.new(child) end if child.is_a?(CukeModeler::Outline) next ScenarioOutline.new(child) end end.compact end |