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

Returns a new instance of Cell.



309
310
311
# File 'lib/cucumber/ast/table.rb', line 309

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

Instance Attribute Details

#lineObject (readonly)

Returns the value of attribute line.



306
307
308
# File 'lib/cucumber/ast/table.rb', line 306

def line
  @line
end

#status=(value) ⇒ Object (writeonly)

Sets the attribute status

Parameters:

  • value

    the value to set the attribute status to.



307
308
309
# File 'lib/cucumber/ast/table.rb', line 307

def status=(value)
  @status = value
end

#valueObject (readonly)

Returns the value of attribute value.



306
307
308
# File 'lib/cucumber/ast/table.rb', line 306

def value
  @value
end

Instance Method Details

#accept(visitor) ⇒ Object



313
314
315
# File 'lib/cucumber/ast/table.rb', line 313

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

#header_cellObject



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

def header_cell
  @table.header_cell(@col)
end

#to_sexpObject

For testing only



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

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