class Cucumber::Core::Gherkin::AstBuilder::DataTableBuilder

Public Instance Methods

location() click to toggle source
# File lib/cucumber/core/gherkin/ast_builder.rb, line 377
def location
  first_line = attributes[:location][:line]
  last_line = first_line + attributes[:rows].length - 1
  Ast::Location.new(file, first_line..last_line)
end
result() click to toggle source
# File lib/cucumber/core/gherkin/ast_builder.rb, line 366
def result
  Ast::DataTable.new(
    rows,
    location
  )
end
rows() click to toggle source
# File lib/cucumber/core/gherkin/ast_builder.rb, line 373
def rows
  attributes[:rows] = attributes[:rows].map { |r| r[:cells].map { |c| c[:value] } }
end