Class: Gherkin::Formatter::Model::Examples::Builder

Inherits:
Object
  • Object
show all
Defined in:
lib/gherkin/formatter/model.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Builder


109
110
111
112
# File 'lib/gherkin/formatter/model.rb', line 109

def initialize(*args)
  @args = *args
  @rows = nil
end

Instance Method Details

#buildObject


123
124
125
# File 'lib/gherkin/formatter/model.rb', line 123

def build
  Examples.new(*(@args << @rows))
end

#replay(formatter) ⇒ Object


119
120
121
# File 'lib/gherkin/formatter/model.rb', line 119

def replay(formatter)
  build.replay(formatter)
end

#row(comments, cells, line, id) ⇒ Object


114
115
116
117
# File 'lib/gherkin/formatter/model.rb', line 114

def row(comments, cells, line, id)
  @rows ||= []
  @rows << ExamplesTableRow.new(comments, cells, line, id)
end