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

Inherits:
Object
  • Object
show all
Defined in:
lib/cucumber/multiline_argument/data_table.rb

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.



589
590
591
592
593
# File 'lib/cucumber/multiline_argument/data_table.rb', line 589

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

Instance Attribute Details

#lineObject (readonly)

Returns the value of attribute line.



586
587
588
# File 'lib/cucumber/multiline_argument/data_table.rb', line 586

def line
  @line
end

#statusObject

Returns the value of attribute status.



587
588
589
# File 'lib/cucumber/multiline_argument/data_table.rb', line 587

def status
  @status
end

#tableObject (readonly)

Returns the value of attribute table.



586
587
588
# File 'lib/cucumber/multiline_argument/data_table.rb', line 586

def table
  @table
end

#valueObject

Returns the value of attribute value.



587
588
589
# File 'lib/cucumber/multiline_argument/data_table.rb', line 587

def value
  @value
end

Instance Method Details

#==(other) ⇒ Object



599
600
601
# File 'lib/cucumber/multiline_argument/data_table.rb', line 599

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

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


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

def eql?(other)
  self == other
end

#hashObject



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

def hash
  0
end

#inspect!Object



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

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

#to_sexpObject

For testing only



612
613
614
# File 'lib/cucumber/multiline_argument/data_table.rb', line 612

def to_sexp
  [:cell, @value]
end