Class: Cucumber::Parser::GherkinBuilder::ScenarioBuilder
- Defined in:
- lib/cucumber/parser/gherkin_builder.rb
Instance Method Summary collapse
- #add_child(child) ⇒ Object
- #children ⇒ Object
- #result(background, language, feature_tags) ⇒ Object
- #steps(language) ⇒ Object
Methods inherited from Builder
Constructor Details
This class inherits a constructor from Cucumber::Parser::GherkinBuilder::Builder
Instance Method Details
#add_child(child) ⇒ Object
218 219 220 |
# File 'lib/cucumber/parser/gherkin_builder.rb', line 218 def add_child(child) children << child end |
#children ⇒ Object
222 223 224 |
# File 'lib/cucumber/parser/gherkin_builder.rb', line 222 def children @children ||= [] end |
#result(background, language, feature_tags) ⇒ Object
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 |
# File 'lib/cucumber/parser/gherkin_builder.rb', line 197 def result(background, language, ) scenario = Ast::Scenario.new( language, location, background, comment, , , node.keyword, node.name, node.description, steps(language) ) scenario.gherkin_statement(node) scenario end |
#steps(language) ⇒ Object
214 215 216 |
# File 'lib/cucumber/parser/gherkin_builder.rb', line 214 def steps(language) children.map { |child| child.result(language) } end |