Class: Cucumber::Ast::Table::Cell

Inherits:
Object
  • Object
show all
Defined in:
lib/cucumber/ast/table.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value, table, row, col, line) ⇒ Cell



321
322
323
324
# File 'lib/cucumber/ast/table.rb', line 321

def initialize(value, table, row, col, line)
  @value, @table, @row, @col, @line = value, table, row, col, line
  @status = :passed
end

Instance Attribute Details

#lineObject (readonly)

Returns the value of attribute line.



318
319
320
# File 'lib/cucumber/ast/table.rb', line 318

def line
  @line
end

#status=(value) ⇒ Object (writeonly)

Sets the attribute status



319
320
321
# File 'lib/cucumber/ast/table.rb', line 319

def status=(value)
  @status = value
end

#valueObject (readonly)

Returns the value of attribute value.



318
319
320
# File 'lib/cucumber/ast/table.rb', line 318

def value
  @value
end

Instance Method Details

#accept(visitor) ⇒ Object



326
327
328
# File 'lib/cucumber/ast/table.rb', line 326

def accept(visitor)
  visitor.visit_table_cell_value(@value, col_width, @status)
end

#header_cellObject



330
331
332
# File 'lib/cucumber/ast/table.rb', line 330

def header_cell
  @table.header_cell(@col)
end

#to_sexpObject

For testing only



335
336
337
# File 'lib/cucumber/ast/table.rb', line 335

def to_sexp #:nodoc:
  [:cell, @value]
end