Module: Cucumber::Core::Gherkin::Writer::HasElements
- Includes:
- AcceptsComments
- Included in:
- Background, Feature, Rule, Scenario, ScenarioOutline, Step
- Defined in:
- lib/cucumber/core/gherkin/writer/helpers.rb
Defined Under Namespace
Modules: HasElementBuilders
Class Method Summary collapse
Instance Method Summary collapse
Methods included from AcceptsComments
#comment, #comment_lines, #slurp_comments
Class Method Details
.included(base) ⇒ Object
73 74 75 |
# File 'lib/cucumber/core/gherkin/writer/helpers.rb', line 73 def self.included(base) base.extend HasElementBuilders end |
Instance Method Details
#build(source = []) ⇒ Object
77 78 79 |
# File 'lib/cucumber/core/gherkin/writer/helpers.rb', line 77 def build(source = []) elements.inject(source + statements) { |acc, el| el.build(acc) } end |