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

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

Overview

:nodoc:

Direct Known Subclasses

SurplusCell

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value, table, line) ⇒ Cell

Returns a new instance of Cell.



617
618
619
# File 'lib/cucumber/ast/table.rb', line 617

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

Instance Attribute Details

#lineObject (readonly)

Returns the value of attribute line.



614
615
616
# File 'lib/cucumber/ast/table.rb', line 614

def line
  @line
end

#statusObject

Returns the value of attribute status.



615
616
617
# File 'lib/cucumber/ast/table.rb', line 615

def status
  @status
end

#tableObject (readonly)

Returns the value of attribute table.



614
615
616
# File 'lib/cucumber/ast/table.rb', line 614

def table
  @table
end

#valueObject

Returns the value of attribute value.



615
616
617
# File 'lib/cucumber/ast/table.rb', line 615

def value
  @value
end

Instance Method Details

#==(o) ⇒ Object



630
631
632
# File 'lib/cucumber/ast/table.rb', line 630

def ==(o)
  SurplusCell === o || value == o.value
end

#accept(visitor) ⇒ Object



621
622
623
624
# File 'lib/cucumber/ast/table.rb', line 621

def accept(visitor)
  return if Cucumber.wants_to_quit
  visitor.visit_table_cell_value(value, status)
end

#inspect!Object



626
627
628
# File 'lib/cucumber/ast/table.rb', line 626

def inspect!
  @value = "(i) #{value.inspect}"
end

#to_sexpObject

For testing only



635
636
637
# File 'lib/cucumber/ast/table.rb', line 635

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