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



344
345
346
347
348
349
# File 'lib/cucumber/core/gherkin/ast_builder.rb', line 344

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

#rowsObject



351
352
353
# File 'lib/cucumber/core/gherkin/ast_builder.rb', line 351

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