Class: Cucumber::MultilineArgument::DataTable::Cell

Inherits:
Object
  • Object
show all
Defined in:
lib/cucumber/multiline_argument/data_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.


596
597
598
599
600
# File 'lib/cucumber/multiline_argument/data_table.rb', line 596

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

Instance Attribute Details

#lineObject (readonly)

Returns the value of attribute line


593
594
595
# File 'lib/cucumber/multiline_argument/data_table.rb', line 593

def line
  @line
end

#statusObject

Returns the value of attribute status


594
595
596
# File 'lib/cucumber/multiline_argument/data_table.rb', line 594

def status
  @status
end

#tableObject (readonly)

Returns the value of attribute table


593
594
595
# File 'lib/cucumber/multiline_argument/data_table.rb', line 593

def table
  @table
end

#valueObject

Returns the value of attribute value


594
595
596
# File 'lib/cucumber/multiline_argument/data_table.rb', line 594

def value
  @value
end

Instance Method Details

#==(other) ⇒ Object


606
607
608
# File 'lib/cucumber/multiline_argument/data_table.rb', line 606

def ==(other)
  SurplusCell == other.class || value == other.value
end

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)

610
611
612
# File 'lib/cucumber/multiline_argument/data_table.rb', line 610

def eql?(other)
  self == other
end

#hashObject


614
615
616
# File 'lib/cucumber/multiline_argument/data_table.rb', line 614

def hash
  0
end

#inspect!Object


602
603
604
# File 'lib/cucumber/multiline_argument/data_table.rb', line 602

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

#to_sexpObject

For testing only


619
620
621
# File 'lib/cucumber/multiline_argument/data_table.rb', line 619

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