Class: Cucumber::Core::Gherkin::AstBuilder::DataTableBuilder

Inherits:
Builder
  • Object
show all
Defined in:
lib/cucumber/core/gherkin/ast_builder.rb

Instance Method Summary collapse

Methods inherited from Builder

#handle_comments, #initialize

Constructor Details

This class inherits a constructor from Cucumber::Core::Gherkin::AstBuilder::Builder

Instance Method Details

#resultObject



357
358
359
360
361
362
# File 'lib/cucumber/core/gherkin/ast_builder.rb', line 357

def result
  Ast::DataTable.new(
    rows,
    location
  )
end

#rowsObject



364
365
366
# File 'lib/cucumber/core/gherkin/ast_builder.rb', line 364

def rows
  attributes[:rows] = attributes[:rows].map { |r| r[:cells].map { |c| c[:value] } }
end