module Cucumber::Core::Gherkin::Writer::HasElements

Public Class Methods

included(base) click to toggle source
# File lib/cucumber/core/gherkin/writer/helpers.rb, line 73
def self.included(base)
  base.extend HasElementBuilders
end

Public Instance Methods

build(source = []) click to toggle source
# File lib/cucumber/core/gherkin/writer/helpers.rb, line 77
def build(source = [])
  elements.inject(source + statements) { |acc, el| el.build(acc) }
end

Private Instance Methods

elements() click to toggle source
# File lib/cucumber/core/gherkin/writer/helpers.rb, line 82
def elements
  @elements ||= []
end