Class: Cucumber::Core::Gherkin::AstBuilder::ScenarioBuilder
- Defined in:
- lib/cucumber/core/gherkin/ast_builder.rb
Instance Attribute Summary collapse
-
#step_builders ⇒ Object
readonly
Returns the value of attribute step_builders.
Instance Method Summary collapse
- #children ⇒ Object
-
#initialize ⇒ ScenarioBuilder
constructor
A new instance of ScenarioBuilder.
- #result(language) ⇒ Object
- #steps(language) ⇒ Object
Methods inherited from Builder
Constructor Details
#initialize ⇒ ScenarioBuilder
Returns a new instance of ScenarioBuilder.
180 181 182 183 |
# File 'lib/cucumber/core/gherkin/ast_builder.rb', line 180 def initialize(*) super @step_builders = attributes[:steps].map { |step| StepBuilder.new(file, step) } end |
Instance Attribute Details
#step_builders ⇒ Object (readonly)
Returns the value of attribute step_builders.
178 179 180 |
# File 'lib/cucumber/core/gherkin/ast_builder.rb', line 178 def step_builders @step_builders end |
Instance Method Details
#children ⇒ Object
201 202 203 |
# File 'lib/cucumber/core/gherkin/ast_builder.rb', line 201 def children step_builders end |
#result(language) ⇒ Object
185 186 187 188 189 190 191 192 193 194 195 |
# File 'lib/cucumber/core/gherkin/ast_builder.rb', line 185 def result(language) Ast::Scenario.new( location, comments, , keyword, name, description, steps(language) ) end |
#steps(language) ⇒ Object
197 198 199 |
# File 'lib/cucumber/core/gherkin/ast_builder.rb', line 197 def steps(language) step_builders.map { |builder| builder.result(language) } end |