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.



569
570
571
# File 'lib/cucumber/multiline_argument/data_table.rb', line 569

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

Instance Attribute Details

#lineObject (readonly)

Returns the value of attribute line.



566
567
568
# File 'lib/cucumber/multiline_argument/data_table.rb', line 566

def line
  @line
end

#statusObject

Returns the value of attribute status.



567
568
569
# File 'lib/cucumber/multiline_argument/data_table.rb', line 567

def status
  @status
end

#tableObject (readonly)

Returns the value of attribute table.



566
567
568
# File 'lib/cucumber/multiline_argument/data_table.rb', line 566

def table
  @table
end

#valueObject

Returns the value of attribute value.



567
568
569
# File 'lib/cucumber/multiline_argument/data_table.rb', line 567

def value
  @value
end

Instance Method Details

#==(o) ⇒ Object



577
578
579
# File 'lib/cucumber/multiline_argument/data_table.rb', line 577

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

#eql?(o) ⇒ Boolean

Returns:

  • (Boolean)


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

def eql?(o)
  self == o
end

#hashObject



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

def hash
  0
end

#inspect!Object



573
574
575
# File 'lib/cucumber/multiline_argument/data_table.rb', line 573

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

#to_sexpObject

For testing only



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

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