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.



692
693
694
# File 'lib/cucumber/ast/table.rb', line 692

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

Instance Attribute Details

#lineObject (readonly)

Returns the value of attribute line.



689
690
691
# File 'lib/cucumber/ast/table.rb', line 689

def line
  @line
end

#statusObject

Returns the value of attribute status.



690
691
692
# File 'lib/cucumber/ast/table.rb', line 690

def status
  @status
end

#tableObject (readonly)

Returns the value of attribute table.



689
690
691
# File 'lib/cucumber/ast/table.rb', line 689

def table
  @table
end

#valueObject

Returns the value of attribute value.



690
691
692
# File 'lib/cucumber/ast/table.rb', line 690

def value
  @value
end

Instance Method Details

#==(o) ⇒ Object



705
706
707
# File 'lib/cucumber/ast/table.rb', line 705

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

#accept(visitor) ⇒ Object



696
697
698
699
# File 'lib/cucumber/ast/table.rb', line 696

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

#eql?(o) ⇒ Boolean

Returns:

  • (Boolean)


709
710
711
# File 'lib/cucumber/ast/table.rb', line 709

def eql?(o)
  self == o
end

#hashObject



713
714
715
# File 'lib/cucumber/ast/table.rb', line 713

def hash
  0
end

#inspect!Object



701
702
703
# File 'lib/cucumber/ast/table.rb', line 701

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

#to_sexpObject

For testing only



718
719
720
# File 'lib/cucumber/ast/table.rb', line 718

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