Class: Cucumber::Core::Ast::ExamplesTable::Header

Inherits:
Object
  • Object
show all
Includes:
HasLocation
Defined in:
lib/cucumber/core/ast/examples_table.rb

Instance Method Summary collapse

Methods included from HasLocation

#attributes, #comments, #file, #file_colon_line, #line, #location, #match_locations?, #multiline_arg, #tags

Constructor Details

#initialize(cells, location) ⇒ Header

Returns a new instance of Header.



43
44
45
46
# File 'lib/cucumber/core/ast/examples_table.rb', line 43

def initialize(cells, location)
  @cells = cells
  @location = location
end

Instance Method Details

#build_row(row_cells, number, location, language) ⇒ Object



52
53
54
# File 'lib/cucumber/core/ast/examples_table.rb', line 52

def build_row(row_cells, number, location, language)
  Row.new(Hash[@cells.zip(row_cells)], number, location, language)
end

#inspectObject



56
57
58
# File 'lib/cucumber/core/ast/examples_table.rb', line 56

def inspect
  "#<#{self.class} #{values} (#{location})>"
end

#valuesObject



48
49
50
# File 'lib/cucumber/core/ast/examples_table.rb', line 48

def values
  @cells
end