Class: Lucid::Parser::TDLBuilder::ScenarioOutlineBuilder
- Defined in:
- lib/lucid/tdl_builder.rb
Instance Method Summary collapse
- #add_child(child) ⇒ Object
- #add_examples(examples_section, node) ⇒ Object
- #children ⇒ Object
- #result(background, language, feature_tags) ⇒ Object
- #steps(language) ⇒ Object
Methods inherited from Builder
Constructor Details
This class inherits a constructor from Lucid::Parser::TDLBuilder::Builder
Instance Method Details
#add_child(child) ⇒ Object
253 254 255 |
# File 'lib/lucid/tdl_builder.rb', line 253 def add_child(child) children << child end |
#add_examples(examples_section, node) ⇒ Object
244 245 246 247 |
# File 'lib/lucid/tdl_builder.rb', line 244 def add_examples(examples_section, node) @examples_sections ||= [] @examples_sections << [examples_section, node] end |
#children ⇒ Object
257 258 259 |
# File 'lib/lucid/tdl_builder.rb', line 257 def children @children ||= [] end |
#result(background, language, feature_tags) ⇒ Object
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'lib/lucid/tdl_builder.rb', line 226 def result(background, language, ) scenario_outline = AST::ScenarioOutline.new( language, location, background, comment, , , node.keyword, node.name, node.description, steps(language), examples_sections ) scenario_outline.gherkin_statement(node) scenario_outline end |
#steps(language) ⇒ Object
249 250 251 |
# File 'lib/lucid/tdl_builder.rb', line 249 def steps(language) children.map { |child| child.result(language) } end |