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.



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

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

Instance Attribute Details

#commentsObject (readonly)

Returns the value of attribute comments.



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

def comments
  @comments
end

Instance Method Details

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



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

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

#inspectObject



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

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

#valuesObject



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

def values
  @cells
end