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.



703
704
705
# File 'lib/cucumber/multiline_argument/data_table.rb', line 703

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

Instance Attribute Details

#lineObject (readonly)

Returns the value of attribute line.



700
701
702
# File 'lib/cucumber/multiline_argument/data_table.rb', line 700

def line
  @line
end

#statusObject

Returns the value of attribute status.



701
702
703
# File 'lib/cucumber/multiline_argument/data_table.rb', line 701

def status
  @status
end

#tableObject (readonly)

Returns the value of attribute table.



700
701
702
# File 'lib/cucumber/multiline_argument/data_table.rb', line 700

def table
  @table
end

#valueObject

Returns the value of attribute value.



701
702
703
# File 'lib/cucumber/multiline_argument/data_table.rb', line 701

def value
  @value
end

Instance Method Details

#==(o) ⇒ Object



711
712
713
# File 'lib/cucumber/multiline_argument/data_table.rb', line 711

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

#eql?(o) ⇒ Boolean

Returns:

  • (Boolean)


715
716
717
# File 'lib/cucumber/multiline_argument/data_table.rb', line 715

def eql?(o)
  self == o
end

#hashObject



719
720
721
# File 'lib/cucumber/multiline_argument/data_table.rb', line 719

def hash
  0
end

#inspect!Object



707
708
709
# File 'lib/cucumber/multiline_argument/data_table.rb', line 707

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

#to_sexpObject

For testing only



724
725
726
# File 'lib/cucumber/multiline_argument/data_table.rb', line 724

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