Class: Tabulard::Table::Cell

Inherits:
Object
  • Object
show all
Defined in:
lib/tabulard/table.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(row:, col:, value:) ⇒ Cell

Returns a new instance of Cell.



85
86
87
88
89
# File 'lib/tabulard/table.rb', line 85

def initialize(row:, col:, value:)
  @row = row
  @col = col
  @value = value
end

Instance Attribute Details

#colObject (readonly)

Returns the value of attribute col.



91
92
93
# File 'lib/tabulard/table.rb', line 91

def col
  @col
end

#rowObject (readonly)

Returns the value of attribute row.



91
92
93
# File 'lib/tabulard/table.rb', line 91

def row
  @row
end

#valueObject (readonly)

Returns the value of attribute value.



91
92
93
# File 'lib/tabulard/table.rb', line 91

def value
  @value
end

Instance Method Details

#==(other) ⇒ Object



93
94
95
# File 'lib/tabulard/table.rb', line 93

def ==(other)
  other.is_a?(self.class) && row == other.row && col == other.col && value == other.value
end