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

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from HasLocation

#all_locations, #attributes, #file, #file_colon_line, #line, #location, #multiline_arg, #tags

Constructor Details

#initialize(cells, location, comments) ⇒ Header

Returns a new instance of Header.



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

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

Instance Attribute Details

#commentsObject (readonly)

Returns the value of attribute comments.



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

def comments
  @comments
end

Instance Method Details

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



54
55
56
# File 'lib/cucumber/core/ast/examples_table.rb', line 54

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

#inspectObject



58
59
60
# File 'lib/cucumber/core/ast/examples_table.rb', line 58

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

#valuesObject



50
51
52
# File 'lib/cucumber/core/ast/examples_table.rb', line 50

def values
  @cells
end