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.



582
583
584
585
586
# File 'lib/cucumber/multiline_argument/data_table.rb', line 582

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

Instance Attribute Details

#lineObject (readonly)

Returns the value of attribute line.



579
580
581
# File 'lib/cucumber/multiline_argument/data_table.rb', line 579

def line
  @line
end

#statusObject

Returns the value of attribute status.



580
581
582
# File 'lib/cucumber/multiline_argument/data_table.rb', line 580

def status
  @status
end

#tableObject (readonly)

Returns the value of attribute table.



579
580
581
# File 'lib/cucumber/multiline_argument/data_table.rb', line 579

def table
  @table
end

#valueObject

Returns the value of attribute value.



580
581
582
# File 'lib/cucumber/multiline_argument/data_table.rb', line 580

def value
  @value
end

Instance Method Details

#==(other) ⇒ Object



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

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

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)


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

def eql?(other)
  self == other
end

#hashObject



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

def hash
  0
end

#inspect!Object



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

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

#to_sexpObject

For testing only



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

def to_sexp
  [:cell, @value]
end