Module: Cucumber::Core::Gherkin::Writer::HasElements

Includes:
AcceptsComments
Included in:
Background, Feature, Rule, Scenario, ScenarioOutline, Step
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/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/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/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/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/cucumber-core-11.0.0/lib/cucumber/core/gherkin/writer/helpers.rb', line 77

def build(source = [])
  elements.inject(source + statements) { |acc, el| el.build(acc) }
end