Class: Gherkin::Formatter::Model::Examples::Builder
- Inherits:
-
Object
- Object
- Gherkin::Formatter::Model::Examples::Builder
- Defined in:
- lib/gherkin/formatter/model.rb
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(*args) ⇒ Builder
constructor
A new instance of Builder.
- #replay(formatter) ⇒ Object
- #row(comments, cells, line, id) ⇒ Object
Constructor Details
#initialize(*args) ⇒ Builder
Returns a new instance of Builder.
109 110 111 112 |
# File 'lib/gherkin/formatter/model.rb', line 109 def initialize(*args) @args = *args @rows = nil end |
Instance Method Details
#build ⇒ Object
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 |